something wrong with my codes

EDIT1 : solved already
Last edited on
There is some code missing. What is log?

Last edited on
oh sorry about that moschops...
here it goes

struct logsheet{

int emp_num;
char emp_fname[30], emp_lname[30];
float emp_sal;

};

int main (){
logsheet log[50];
(the codes i posted before placed in here)
}
[code][/code] tags, they make the world a better place...
If you're seeing numbers like -1.07374e+008, the number you're trying to store in the respective variable is too large. Every data type has a limit to the size of the number it can store. Here's a link that might help.

http://www.cplusplus.com/doc/tutorial/variables/

Read the part about "Fundamental Data Types".
@craniumonemty sorry for that, im new to this forum world thingy... thnx for th advice ^_^

@packetpirate, actually i found out that maybe my variable is writing out an empty storage because i have not input any large number at all and it comes from a txt file which last characters are breakline commands only, i dont know if it is reading that empty space and assigning it to a variable then write it in the main txt file...
Topic archived. No new replies allowed.