Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
C
Assign one array to another array
Assign one array to another array
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
ekailan
New Member
Join Date:
Oct 2010
Posts:
11
#1
Assign one array to another array
Oct 20 '10, 12:58 PM
Code:
wchar_t a[50]; wchar_t b[50]; a=L"asdfgh";
why I cant say
b=a;
How to exchange values between tow wchar_t arrays
Last edited by
Markus
;
Oct 31 '10, 02:49 PM
.
Reason:
Fixed [code] tags
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#2
Oct 20 '10, 02:26 PM
You can't say b=a because the name of an array is the address of element 0.
The compiler will not let you chnage the address of a local variable.
You will need to copy one array to the other element by element.
Your problem has nothing to to with wchar_t but everything to do with arrays.
You might read:
http://bytes.com/topic/c/insights/77...rrays-revealed
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment