473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Assign one array to another array

11
Expand|Select|Wrap|Line Numbers
  1.  
  2. wchar_t a[50];
  3. wchar_t b[50];
  4.  
  5. a=L"asdfgh";
why I cant say

b=a;

How to exchange values between tow wchar_t arrays
Oct 20 '10 #1
1 25747
weaknessforcats
9,208 Expert Mod 8TB
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
Oct 20 '10 #2

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

Similar topics

1
by: Tek9_AK | last post by:
I need to find a way to transfer all the values of an array inside a function out of the fuction into another array. IE function splice($filename){ if(file_exists($filename)){...
2
by: Tek9_AK | last post by:
I need to find a way to transfer all the values of an array inside a function out of the fuction into another array. IE function splice($filename){ if(file_exists($filename)){...
6
by: Ram Laxman | last post by:
Hi all, Can I assign an array to a vector if both(array and vector) holds same data type?
20
by: Geoff Cox | last post by:
Hello, This may be the answer to a problem I have - or it may not be possible?! Can I have initial values of variable situation and count defined as var situation = 0; var count = 0;
8
by: kings_oz | last post by:
I have an array or items each item in the array can contain another array of other items and that array of other items can contain more array of item. I want recursively iterate through the array...
1
by: dwight | last post by:
I load an excel spreadsheet into an object array, . What is the best way to copy a row into a single array or arraylist? Currently I just loop through each column and assign it to the new array....
1
by: =?Utf-8?B?Sm9l?= | last post by:
how to dynamic assign two dimensions array size say Dim myArray(x, y) as Integer
13
by: tekinalp67 | last post by:
hi, i am trying to implement a B+ tree. There is no specification in the implementation so i am using arrays to implement the B+ tree. However, there is a problem that i encountered which is I...
9
by: manojrana | last post by:
Can we store an array within another array in javascript var locat = new Array(); var element = new Array(); locat = element; or Can we use like this locat = "manoj";
1
by: dissectcode2 | last post by:
HI - I have a 2d array of uint32's : uint32 x; and I want that array to be assigned to a certain address (which is a set of registers) : uint32 *addr = 0x12345678;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.