Z
Zach
Greetings,
I am writing a routine that will print out the beginning and end
strings for a game:
String A1 -> "Begin msg1"
String B1 -> "End msg1"
String A2 -> "Begin msg2"
String B2 -> "End msg2"
At the game start it prints a string and when game ends it prints a
matching string that is related to the first string such as
"Shakespeare awakens." (String A1) and then "Shakespear goes to
sleep." (String B1)
So the strings have to match.
First I thought of making one char pointer array and having 2
functions, one to print even numbered strings and another to print odd
numbered strings.
Then I thought maybe it would be better to make a 2 dimensional char
pointer array and have the first index print the beginning strings and
the second index print the end strings but I'm having trouble
implementing this.
Any ideas of simple code examples to illustrate putting strings into a
2d char array of pointers and printing out the strings would be
appreciated.
Zach
I am writing a routine that will print out the beginning and end
strings for a game:
String A1 -> "Begin msg1"
String B1 -> "End msg1"
String A2 -> "Begin msg2"
String B2 -> "End msg2"
At the game start it prints a string and when game ends it prints a
matching string that is related to the first string such as
"Shakespeare awakens." (String A1) and then "Shakespear goes to
sleep." (String B1)
So the strings have to match.
First I thought of making one char pointer array and having 2
functions, one to print even numbered strings and another to print odd
numbered strings.
Then I thought maybe it would be better to make a 2 dimensional char
pointer array and have the first index print the beginning strings and
the second index print the end strings but I'm having trouble
implementing this.
Any ideas of simple code examples to illustrate putting strings into a
2d char array of pointers and printing out the strings would be
appreciated.
Zach