结构体板子

#include 
using namespace std;
struct node{
    string name;
    int x, y;
}c;
node f(string str, int a, int b)
{
    node asd;
    asd.name=str;
    asd.x=a;
    asd.y=b;
    return asd;
}
int main()
{
    c=f("asd", 1, 2);
    cout << c.name << " " << c.x << " " << c.y << endl;
    return 0;
}

你可能感兴趣的:(算法)