If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: error C2059: syntax error : '->'

Sh,,,t!
If you do need some help - show the code causing the problem, not the link to something that does not belong to this Forum.
Besides, it is not clear what symbols and from what code page do you use in "->" expression. So, again: post your exact code (use copy/paste, not just typing it in the edit window)

Re: error C2059: syntax error : '->'

I dont need help with any coding, just an explanation of why this might be happening.

In your program, you are using -> in a context for which the compiler does not accept -> as a valid symbol.

If the line containing the -> is supposed to be used correctly but the compiler is reporting a problem, I would look at the code before the line reporting the error for problems - or with the variable definition.

As others have pointed out, to provide further specific guidance you need to post the code containing the error line.

Last edited by 2kaud; August 24th, 2013 at 11:46 AM.

All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
C, C++ Compiler: Microsoft VS2015

Re: error C2059: syntax error : '->'

I dont need help with any coding, just an explanation of why this might be happening.

It is happening because you're using -> where it shouldn't be used.

Quite frustrating because i´ve never had any problems writting....... ->.......in any codes of c++ softwares that ive used like codeblocks or dev c++.

C++ is a computer language that has rules. It isn't a book report where you just "write stuff", and it has nothing to do with codeblocks or dev-C++. Your code violates a C++ rule in some way, and the only way to know is to see the code.