Please support our C++ advertiser: Programming Forums
Views: 1036 | Replies: 10
•
•
Join Date: Jul 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
here what I got and I keep getting a error because of the "string names[];"
these were my guide lines and I'm getting confused
//declare an array of datatype string
//call it names[]
//declare a function dataEntry that takes a string array as input
void dataEntry(string arr[]);
//implement the function: let the user enter names
//declare a function print that takes a string array as input
void print(string arr[]);
//implement the function; use a for loop to print arr[]
//call your function in main() tp print the array
print(names);
thanks for helping me out
these were my guide lines and I'm getting confused
//declare an array of datatype string
//call it names[]
//declare a function dataEntry that takes a string array as input
void dataEntry(string arr[]);
//implement the function: let the user enter names
//declare a function print that takes a string array as input
void print(string arr[]);
//implement the function; use a for loop to print arr[]
//call your function in main() tp print the array
print(names);
thanks for helping me out
cplusplus Syntax (Toggle Plain Text)
#include <iostream> #include <string> using namespace std; void dataEntry(string arr[]); void print(string arr[]); string x; int main() { string names[]; for { arr[]; } int blank; cin >>blank; return 0; } void dataEntry(string arr[]) { cout<< "Please enter a name" cin>>; } void print(string arr[]) { }
Last edited by Ancient Dragon : Jul 30th, 2007 at 10:25 pm. Reason: add line numbers to code tags
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Threaded Mode