Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~215 People Reached
Favorite Forums
Favorite Tags
c++ x 6
Member Avatar for teddycow

I'm having some problems with my code: [CODE] int a, b,x, c, d, cdnr ; char songname[4][3000][30]; char sok[4], avsok[30], cdtitel[4][30], r[30], i; { ifstream array2; array2.open ("array.txt"); array2 >> i; for(a=1;a<=i;a++){ array2>>cdtitel[a]; array2>>r[a]; for(b=1;b<=r[a];b++) array2>>songname[a][b]; } array2.close(); } for(a=1;a<=i;a++){ cout<<cdtitel[a]<<endl<<endl; for(b=1;b<=r[a];b++) cout<<songname[a][b]<<endl; }[/CODE] My text file: [CODE]3 AAAAAAAA 2 …

Member Avatar for mvmalderen
0
100
Member Avatar for teddycow

Hey. I'm currently working on a project where I'm suppose to read album titles including song names from a file into a 2d array. When I input the cd number, only that record should show up in the console. E.g. Cd number: 1 Album title Song 1 Song 2 Song …

Member Avatar for teddycow
0
115