473,899 Members | 4,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can C++ allow multiple array assignment?

For example,
int arr[5];

arr = {1,2,3,4,5};

May 2 '06
11 14975
Mr. Ken wrote:
"Jonathan Mcdougall" <jo************ ***@gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...
Just use a loop, it's simple and it works.
Does std::copy work with old versions of gcc-2.95?

Dunno, you should ask them. It probably does, although 2.95 is what, 10
years old?
Jonathan


Yeah, I am using a loop anyhow. In the manual, it says latest updated on
1993.


Unfortunately 2.95 (2.96, actually) is the version that VxWorks uses.

May 3 '06 #11
Mr. Ken wrote:
"Jonathan Mcdougall" <jo************ ***@gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...

Just use a loop, it's simple and it works.
Does std::copy work with old versions of gcc-2.95?


Dunno, you should ask them. It probably does, although 2.95 is what, 10
years old?
Jonathan


Yeah, I am using a loop anyhow. In the manual, it says latest updated on
1993.


Nice, were there keyboards at that time? :)
Jonathan

May 3 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1395
by: LS | last post by:
1. When I select an assignment, the class roster disappears. I don't want it to show up until I select an assignment. 2. I want to be able to enter grades and submit all with only one submit button. This is my code. File is loaded at http://lynnesmith.net/teacher/entergrades.php +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <HTML> <HEAD> <TITLE>Gradebook</TITLE> <LINK REL="STYLESHEET" TYPE="text/css"...
20
7106
by: Petter Reinholdtsen | last post by:
Is the code fragment 'char a = ("a");' valid ANSI C? The problematic part is '("a")'. I am sure 'char a = "a";' is valid ANSI C, but I am more unsure if it is allowed to place () around the string literal.
5
2243
by: vj | last post by:
Hi all, I am using C++Builder-5. I want to run multiple cpp files at the same time. If I use the C++Builder for running a cpp file (i.e., I just double click the cpp file, it then opens in the C++Builder, where I have the option to 'Run' it), I can't run multiple files, since the Run option is grayed out if one cpp file is already running. I have another option of running the multiple files: from the command prompt (i.e. opening a...
18
2276
by: Vasileios Zografos | last post by:
Hello, can anyone please tell me if there is any difference between the two: double Array1; and
10
3215
by: Patrick F | last post by:
Hi, How come that a programming language not yet 10years old dosen't support Multiple inherritances?, I got 2 classes, both with alot of fields and methods that i need from my third class, so i tried: class myClass3 : myClass1, myClass2 { and got an error says that i cant. How can C# be a compete with C++ if you cant even make a simple thing like that?
20
3546
by: quantumred | last post by:
I found the following code floating around somewhere and I'd like to get some comments. unsigned char a1= { 5,10,15,20}; unsigned char a2= { 25,30,35,40}; *(unsigned int *)a1=*(unsigned int *)a2; // now a1=a2, a1=a2, etc.
2
2521
by: JJA | last post by:
I'm looking at some code I do not understand: var icons = new Array(); icons = new GIcon(); icons.image = "somefilename.png"; I read this as an array of icons is being built. An element of the array is an object itself but what is this syntax of the consecutive double quotes inside the brackets ?
10
5473
by: Zhou Yan | last post by:
I want to define a pointer to a multiple-subscripted array. For instance, I have an array defined as below( I have reduced the size of the array as well as the dimension, but I think it OK to ask this simple case.) /---- int array = { 1, 2, 3, 4 } \-----
14
1007
by: =?Utf-8?B?RWR3YXJk?= | last post by:
Hi everybody, To me the following code shouldn't work but it does ! Imports system.String Dim x As String="This,is,a,test" Dim y(1) As String y=x.Split(",") TextBox1.text=y(3) why "Y" which is an array of lenght 2 accepts index 3 which is larger than its lenght? Any thoughts?
0
11276
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10866
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8043
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5891
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6082
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4301
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.