![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2005
Posts: 21
Rep Power: 0
![]() |
I'd like to know how to save an input of words in a char array, but we don't know beforehand the number of characters we need to save.
|
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
Can you use C++ instead? Because the C++ string class provides much better string operations than that of C, and can hold trings of an arbitrary length.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jan 2005
Posts: 21
Rep Power: 0
![]() |
Got it, thanks.
![]() |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
If you want to use C++ then visit our sister-site DaniWeb. There is a little code snippet called "Playing around with std::string" that gives you some insight into C++ string. Look at:
http://www.daniweb.com/code/snippet117.html |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|