J
Jeannie
Hello group!
I'm in Europe, traveling with my laptop, and I don't any compilers
other than Borland C++ 5.5. available. I also don't have any manuals
or help files available. Sadly, more crippling problems! I never used
C++ much, so, I don't remember commands or fuctions well. My questions
are simple. I posted the DOS window output so you can see the Borland
C++ version I am using:
E:\TZ>bcc32 file2
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
File2.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
What are the commands or functions needed to parse a string into it's
individual characters?
Example:
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <iostream.h>
int main(void)
{ char MyString[80] ;
printf("Input a string: ");
gets(MyString);
printf("The string input was: %s\n", MyString);
return 0;
}
If I have a string input from the keyboard as: Good Morning!
I want a variable, maybe a vector, such as
vec[1]=G, vec[2]=o, vec[3]=o, ... vec[12]=g, vec[13]=!
I will need to determine the length of the string in bytes, and then
move through the string to the end. How do I declare a character
vector variable called "vec" here, and determine the length? Then I
can loop through until the end.
Thanks a million!
Jeannie
I'm in Europe, traveling with my laptop, and I don't any compilers
other than Borland C++ 5.5. available. I also don't have any manuals
or help files available. Sadly, more crippling problems! I never used
C++ much, so, I don't remember commands or fuctions well. My questions
are simple. I posted the DOS window output so you can see the Borland
C++ version I am using:
E:\TZ>bcc32 file2
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
File2.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
What are the commands or functions needed to parse a string into it's
individual characters?
Example:
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <iostream.h>
int main(void)
{ char MyString[80] ;
printf("Input a string: ");
gets(MyString);
printf("The string input was: %s\n", MyString);
return 0;
}
If I have a string input from the keyboard as: Good Morning!
I want a variable, maybe a vector, such as
vec[1]=G, vec[2]=o, vec[3]=o, ... vec[12]=g, vec[13]=!
I will need to determine the length of the string in bytes, and then
move through the string to the end. How do I declare a character
vector variable called "vec" here, and determine the length? Then I
can loop through until the end.
Thanks a million!
Jeannie