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

copy two struct

P: 3
hi, i have a problem copying two struct data.

struct Details {
char Title[20];
char Artist[20];
int noSongs;
float Price;
char Category[20];

Details cd[MAX];
Details cdTEMP[MAX];

i used

cd[i].Title = cdTEMP[i].Title;
cd[i]Artist = cdTEMP[i].Artist;
and so on in a FOR loop...

the compiler gives me an error

" ISO C++ forbids assignment of arrays"

can anybody help??
Nov 5 '06 #1
Share this Question
Share on Google+
1 Reply

P: 18
That is true.
if you do not want to use loops, use memcopy to copy memory in one go
Nov 5 '06 #2

Post your reply

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