|
-
December 30th, 2002, 09:48 AM
#1
about string arrays
How I create an array of a char array (that is, a string array) to contain a defined number of elements specified by the user.
TO be clear, this is what i want to do, in Basic syntax:
Dim num As Integer
INPUT "Enter the number of options", num
Redim OptionDesc(0 To num) As String
For i=0 to num
Print "enter option " + i + "description: "
Line Input OptionDesc(i);
Next i
This can be done with a multidimensional char[x][x] type?
And with pointers ?
Its possible to create the variable in runtime with the NEW operator based on the number of options entered at runtime by the user. How i can do this.
2) difference, if you can reply, between plain "cin" and "cin.getline"
Thank you in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|