Skip to content

Commit

Permalink
add struct file how to use
Browse files Browse the repository at this point in the history
  • Loading branch information
kugouming committed Sep 11, 2016
1 parent cf5be89 commit 7eb9906
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions C++/struct.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*************************************************************************
> File Name: struct.cpp
> Author: wangming
> Mail: [email protected]
> Created Time: 日 9/11 13:51:12 2016
************************************************************************/

#include <iostream>
#include <stdlib.h>
using namespace std;

struct
{
int x;
int y;
}hello,world;

int main()
{
hello.y = 10;
world.x = 15;
int i = hello.y;
cout << i << "," << world.x << endl;
return 0;
}

0 comments on commit 7eb9906

Please sign in to comment.