Variables | Sololearn: Learn to code for FREE!

-1

Variables

As it is stated, I have an option to declare a variable and assign a value later. But I found it doesn't work in my compiler. So what has gone wrong?

2/25/2017 7:33:23 AM

Patrick Tan

5 Answers

New Answer

+4

No its not necessary to include it in main function .Actually it should work !

+3

Use Codeblocks IDE for C++.It is a very good tool. Hope it hels you!!

+2

Nice ,All the best . Keep coding!!

0

should I include both declaration and assignment of value in the main function?

0

thank you very much ! I got it!