Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-14-2005, 05:38 PM   #1
In Runtime
 
outlawstar4761's Avatar
 
Join Date: Jan 2005
Posts: 186
Default C++ arrays

Is it possible to make an array in C++ with an undefined number of components? How so?

Thanks
__________________

outlawstar4761 is offline   Reply With Quote
Old 11-19-2005, 01:32 PM   #2
Daemon Poster
 
RewtGuy's Avatar
 
Join Date: Dec 2004
Posts: 595
Send a message via AIM to RewtGuy
Default Re: C++ arrays

Yes, you'd use dynamic memory allocation.

http://www.cplusplus.com/doc/tutorial/dynamic.html

There's also vectors that'd work. You can google that yourself though.
__________________

__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition.
RewtGuy is offline   Reply With Quote
Old 11-19-2005, 04:27 PM   #3
In Runtime
 
outlawstar4761's Avatar
 
Join Date: Jan 2005
Posts: 186
Default Re: C++ arrays

Thanks!
outlawstar4761 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:52 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0