Skip to content

Instantly share code, notes, and snippets.

@Mashpy
Created September 30, 2013 09:07
Show Gist options
  • Save Mashpy/6761169 to your computer and use it in GitHub Desktop.
Save Mashpy/6761169 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class test
{
public:
string a;
string def();
};
string test::def()
{
string a="abc";
return a;
}
int main()
{
test ob;
ob.a=ob.def();
cout << ob.a<< endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment