Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
Hi,
I worked in C++. I wrote several functions and use only 13 integer global variables.
the error message:
"too many global arguments in file"
appears and the cursor appears at the end line of one of my functions.

Can you help me, please.

What I have tried:

I tried to delete the function within it the error appear but the error sill appears in another function.
Posted
Updated 20-Apr-16 21:05pm
Comments
Dave Kreskowiak 20-Apr-16 16:50pm    
You probably have mismatched { } somewhere. There's really no way anyone can tell you where. You have to go through code in the file and make sure every { }, [ ], and ( ) are matched up properly.
Member 11768130 20-Apr-16 17:26pm    
I will try to correct. thank you very much
nv3 20-Apr-16 18:43pm    
Probably the correct solution, Dave. Why don't you go ahead and post it as such.
Patrice T 20-Apr-16 19:56pm    
What about showing the code ?

1 solution

You dont need to use so many global variables. Global data becomes a horror when you have multi-threading.

Define a class (or a struct) which holds your data. This will simplify your code and you find the bug. And you can init all data and have some nice output for debuggging and saving to disk.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900