|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||||
|
Are you using ANSI C++?
For the arrays you can use the split function to create them which will make the size dynamic. Split by linebreak. Lets call this guy array1[]. Next cycle through the data using a for loop. Add array[0] to another array, lets call him dataArray[array[0]][array.Length-1] Code:
// Using .NET code, convert to whatever - this is just for logic
for (int i=1;i<array.Length;i++) {
dataArray[array[0]][i] = array[i];
}
__________________
Lop |
|
|||||
|
Dude, u need to use malloc.. Alocate memory, based on the name size, and then store the data there..
But remember, C/C++, will automatically create an array, with all the arguments, if i recall its argv[] .. You could just use that instead, of making your own copy ![]() But malloc is what you need to make dynamic memory management systems.. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fread into array position | kenna | C and C++ | 0 | 08-17-2007 09:03 AM |
| Othello program!! 24 hours left! | siren | C and C++ | 1 | 06-14-2007 12:18 PM |
| Python 2D array question | annannienann | Python | 3 | 04-23-2007 05:36 PM |
| Directory Size | John | PHP Forum | 5 | 08-06-2006 02:02 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |