Well, I was wondering if it was possible, which i'm sure it is, to create an array of strings? If so please post the code needed to do so.
Thanks.
Well, I was wondering if it was possible, which i'm sure it is, to create an array of strings? If so please post the code needed to do so.
Thanks.
try creating an array of strings as you would an array of ints, and tell us what you come back with.
Code:#include <iostream> #include <string> int main() { string array_of_strings[] = "hello", "how", "are", "ye", "?" ; for (int i=0; i<5; i++) { cout << array_of_strings[i] << " " ; } }
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
Wow! You are really helpful.
So... can you please do my game for me?
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Mario F why don't you read the announcements instead of asking others to do your work for you!
http://cboard.cprogramming.com/annou...t.php?f=3&a=39
...nyuck, nyuck, nyuck...
Sent from my iPadŽ
darn!
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
[sarcasm]
Well mario is in his 30's, so I'll bet that it's a homework assignment for his
students and he's too lazy to come up with a sample solution for them!!!
[/sarcasm]
Last edited by Richie T; 07-25-2006 at 08:06 PM.
No No's:
fflush (stdin); gets (); void main ();
Goodies:
Example of fgets (); The FAQ, C/C++ Reference
My Gear:
OS - Windows XP
IDE - MS Visual C++ 2008 Express Edition
ASCII stupid question, get a stupid ANSI
LOLOriginally Posted by Mario F.