By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,234 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,234 IT Pros & Developers. It's quick & easy.

c++

P: 1
Hi can anyone tell me what is wrong with this codes:

string StoreSong ()
{
if(!dup) && (len[genre-1] < MAX)
row = lenArr[genre-1];
col = genre-1;
lenArr[col]++;
genreTable[row][col] = s;
}


error i get is notype for genreTable
Mar 7 '07 #1
Share this Question
Share on Google+
1 Reply


sicarie
Expert Mod 2.5K+
P: 4,677
Hi can anyone tell me what is wrong with this codes:

string StoreSong ()
{
if(!dup) && (len[genre-1] < MAX)
row = lenArr[genre-1];
col = genre-1;
lenArr[col]++;
genreTable[row][col] = s;
}


error i get is notype for genreTable
It looks like this StoreSong is a function, in which case genreTable[][] is not declared - you're trying to access something out of the scope of the function. Try passing and returning (as you don't declare any return) a genreTable. Also, your if statement will only be executed on the row statement below it (and not the col statement - it will be executed everytime no matter what) - if you want to include everything, use the '{' and '}' as beginning and end brackets to show what you want to be included.
Mar 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.