Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

return array of string in function c++

string* getNames() {
 string* names = new string[3];
 names[0] = "Simon";
 names[1] = "Peter";
 names[2] = "Dave"; 

 return names;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #array #string #function
ADD COMMENT
Topic
Name
5+5 =