- Feb 17, 2002
- 4,723
- 80
- 91
Hey guys. I haven't seriously used Microsoft Visual C++ in many years, so I'm not familiar with its quirks. I'm using Visual Studio 2010 on Windows 7. My code was originally written in Mac OS X (Unix) using the GNU C++ compiler.
For the most part, I've figured out all the other errors. There's one more thing that's killing my code: a syntax error that I just don't understand.
Here's the line:
Here are the errors (all for the same line):
ComponentPixel is a struct of types {int, int}.
component is of type std::vector<ComponentPixel>
Thanks in advance
For the most part, I've figured out all the other errors. There's one more thing that's killing my code: a syntax error that I just don't understand.
Here's the line:
Code:
component.push_back((ComponentPixel){i, j});
Here are the errors (all for the same line):
Code:
Error 5 error C2143: syntax error : missing ')' before '{'
Error 6 error C2059: syntax error : ')'
Error 7 error C2143: syntax error : missing ';' before '{'
Error 8 error C2143: syntax error : missing ';' before '}'
Error 9 error C2059: syntax error : ')'
ComponentPixel is a struct of types {int, int}.
component is of type std::vector<ComponentPixel>
Thanks in advance
Last edited:
