![]() |
|
#1
|
||||
|
||||
Problem assigning strings to pointers.Hi im designing a madlibs program for school and need a little bit of help.
What i want to do is beable to assign each userinput to the string pointer. CPP / C++ / C Code:
|
||||
|
#2
|
|||
|
|||
Re: Problem assigning strings to pointers.Quote:
Why not just use an array of std::string objects? CPP / C++ / C Code:
Here's the output for a run. I made the first loop short so that I could test without entering all 15 things: Code:
|
|
#3
|
||||
|
||||
Re: Problem assigning strings to pointers.yeah that would work lol wasnt even thinking about that. Thanks for your help
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Array of Pointers to strings | clp | C++ Forum | 6 | 28-Nov-2008 21:47 |
| Accessing strings using pointers | anitha09 | C Programming Language | 5 | 17-Jan-2008 09:47 |
| [Tutorial] Pointers in C (Part II) | Stack Overflow | C Programming Language | 0 | 27-Apr-2005 18:36 |
| [Tutorial] Pointers in C (Part I) | Stack Overflow | C Programming Language | 1 | 08-Apr-2005 19:35 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The