For example:
Code: Select all
struct nvPair {
char name[10];
char value[5];
};
nvPair pairs[100];
void printChart( nvPair pairs[], const int nameLength, const int valueLength, int nvIndex ) {
fio::print( " Beautiful Chart Bitches!\n" );
fio::print( " ------------------------\n\n" );
for ( int j = 0; j < nvIndex; j++ ) {
fio::print( pairs[j].name );
fio::print( "|" );
for ( int i = 0; i < fio::str2int( pairs[i].value ); i++ ) {
fio::print( "=" );
}
fio::print( "\n" );
}
}
fio::print( pairs[j].name ); outputs "steve 3"
Not sure where the 3 is coming from.
fio::print( "|" ); overwrites the "s" in "steve"
fio::print( "=" ); overwrites more letters in "steve" for each "=".
Is this another VC++ compiler error or am I using it wrong?