Re: Errors with ->*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Line 9 should be:
int * xptr, * yptr ;
You forgot a '*'. About the rest, you are using the pointer to members
incorrectly, look at
http://www.google.com/search?q=pointer+to+member for examples and usage.
Darío

On Tue, Aug 2, 2011 at 13:31, Shriramana Sharma <samjnaa@xxxxxxxxx> wrote:
> Hello -- long time since I posted on this list.
>
> I'm trying to understand the use of ->* but in compiling the attached
> program which I thought was straightforward I am getting the following
> errors:
>
> foo.cpp: In constructor ‘mystruct::mystruct()’:
> foo.cpp:9:12: error: invalid conversion from ‘int*’ to ‘int’
> foo.cpp: In function ‘int main()’:
> foo.cpp:21:7: error: ‘xptr’ was not declared in this scope
> foo.cpp:22:7: error: ‘yptr’ was not declared in this scope
>
> Please help.
>
> --
> Shriramana Sharma
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux