Skip to content
Browse files

nbrOfEntry is now a global variable

	modified:   main.c
  • Loading branch information...
1 parent 4faef78 commit ae9500303639b1c0a91e76e1a4a0e64d58be828a @Nic0 committed Jan 24, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 main.c
View
7 main.c
@@ -32,20 +32,21 @@ int main (void)
* structure name/login/pass we've got.
* We count lines, and give "lines/ELEMENT" structures
*/
-
int nbrOfLine = 0;
int countLine (nbrOfLine);
+ int nbrOfEntry;
+ nbrOfEntry = nbrOfLine / ELEMENT;
+
/* We take for each entry juste his name
* It's put in the entry.name structure
*/
+
FILE *passfile;
passfile = fopen("/home/nicolas/pass.txt", "r");
if(passfile != NULL)
{
- int nbrOfEntry;
- nbrOfEntry = nbrOfLine / ELEMENT;
struct Entry entry[nbrOfEntry];
int n = 0;

0 comments on commit ae95003

Please sign in to comment.
Something went wrong with that request. Please try again.