1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#include<iostream>
#include<cstring>
using namespace std;
void printInfo(char*, char);
int main()
{
char symbolDelimiter = ',';
char *array1[] = { "joe smith, joe, aol.com", "sue jones, sue, gmail.com", // why isnt this just an array?
"bob adams, bob.adams, yahoo.com", "pam oliver, pamo, att.net",
"ron johnson, jron, sbcglobal.net", "jenny jorgan, jj1, msn.com" };
printInfo(*array1, symbolDelimiter);
return 0;
}
void printInfo(char *array1, char ch)
{
while (*array1 != '\0')
{
if (*array1 == ch)
{
*array1 = '\0';
}
array1++;
}
cout << array1; // I know this will not give me a full output of what I need, but
// it is simply more of a stub for me to check.
}
|