orCode:printf("\n\n\t\t1st Player:"); scan("CLAN[%d]",&CLAN[10]);
Code:printf("\n\n\t\t1st Player:"); scan("%d",&CLAN[10]);
orCode:printf("\n\n\t\t1st Player:"); scan("CLAN[%d]",&CLAN[10]);
Code:printf("\n\n\t\t1st Player:"); scan("%d",&CLAN[10]);
it has to be scanf not scanOriginally Posted by Marrah_janine
both are possible
in the 1st case, there has to be this input from the player:
CLAN[43]
where 43 is some kind of a number.
in the second case, the user has to write
43
the same deal with the 43 again
the stuff that you write in the "" is the form of data that the scanf function has to read - if you try to do memory allocation in it or anything else, it won't work, because scanf doesn't care about it - it only cares about the %d and %f and so on...
and this is a C++ programming board. Your current code is in C, so please don't post in the wrong subforum again
CLAN should be an array with at least 11 elements
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler