I got this error message: error C2447: '{' : missing function header (old-style formal list?)

What does it mean? How can I fix this? Please let me know. Thank you!

I started with...
#include <iostream>
using namespace std;
int num;
{
and then i added my variables...

I got this error message: error C2447: '{' : missing function header (old-style formal list?)

What does it mean? How can I fix this? Please let me know. Thank you!

I started with...
#include <iostream>
using namespace std;
int num;
{
and then i added my variables...

I can't think of a reason why that bracket should be there, so an error makes sense. You should probably move it or delete it, but without seeing more code, it's hard to say. It looks out of place though. Post more code please.

Probably you forget to start your main function from its header int main():

#include <iostream>
using namespace std;
int num;
int main() // ?????????????
{

;)
Why int num declared on global level?..

Ok, thanks! I got it now! I have another question regarding tables...

how do I make a 4 column table for some variables?
do i just leave tab spaces between the variables on one line? it comes out a little sloppy.

Ok, thanks! I got it now! I have another question regarding tables...

how do I make a 4 column table for some variables?
do i just leave tab spaces between the variables on one line? it comes out a little sloppy.

Need more details. Please post exactly what you are trying to do and the attempt that came out sloppy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.