Skip to content

Commit 1ee3197

Browse files
committed
structure function folder created
passing structure member program was uploaded
1 parent 127ac45 commit 1ee3197

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"ostream": "cpp"
4+
}
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
struct numbers
4+
{
5+
int num;
6+
}var;
7+
void pass(int num) // function to pass the structure member and print
8+
{
9+
cout<<"Passed number: "<<num<<endl;
10+
}
11+
int main()
12+
{
13+
var.num=20;
14+
pass(var.num); // passing structure member num
15+
return 0;
16+
}
Binary file not shown.

0 commit comments

Comments
 (0)