Im useing dev C++ and im currently trying to teach myself c++ with this websites help. I try useing the sample codes and i get multiple definition of 'main' errors...i copy and paste and ive typed it out...any help on this?
This is a discussion on Alright this is wierd within the C++ Programming forums, part of the General Programming Boards category; Im useing dev C++ and im currently trying to teach myself c++ with this websites help. I try useing the ...
Im useing dev C++ and im currently trying to teach myself c++ with this websites help. I try useing the sample codes and i get multiple definition of 'main' errors...i copy and paste and ive typed it out...any help on this?
nevermind
Just make sure you never type "void main" please. Use "int main" if you see any sites using "void main". Just because the sites use it in their examples doesn't mean it's a good thing.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
No, but seeing as so many tutorials or stuff use void main, it can be good info.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
Many tutorials dont give the "complete" code,for example if they want to teach you loops,they will just write:....i copy and paste...
If you copy-paste these kind of things,obviously you will get errors.So include all the necessary header files,and paste the code in int main()Code:for(i=0;i<10;i++) { i+=1; }