C++ examples for Function:Function Creation
Create a function which doesn't return anything.
#include <iostream> #include <string> using namespace std; void setName(string newname) { cout << "New user is " << newname << endl; } int main()/*from w ww .j av a2s . co m*/ { setName("a"); return 0; }