Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error with GCC 4.2.1/6.2.0 and the solution #1

Open
SymenYang opened this issue Jan 5, 2018 · 1 comment
Open

Compile Error with GCC 4.2.1/6.2.0 and the solution #1

SymenYang opened this issue Jan 5, 2018 · 1 comment

Comments

@SymenYang
Copy link

There are some errors in codes which will cause compile error. I tried GCC 4.2.1 and 6.2.0 and will both get the problems. This problem caused by 2 code errors.
First is the 2D STL-Vector initial commands. change the code
std::vector < std::vector<SOMETHING> >( size1 , size2 )
into
std::vector < std::vector<SOMETHING> > ( size1 , std::vector<SOMETHING>(size2) )
Second is the output part. In main.cpp, use "%s" to output a String value instead of Char* may cause problem. Also the "void main()" should change to "int main()" and add "return 0"

@bbbrian94
Copy link

thx really help a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants