I have read a article in the following link
http://www.embedded.com/electronics-blogs/programming-pointers/4024450/Tag-vs-Type-Names
Here author says that, use of follwing is wrong.
struct s
{
--
};
s var;
But in my sample code its works perfectly.
1 #include<iostream>
2 using namespace std;
3
4 struct s
5 {
6 int sd;
7 };
8 s v;
9
10
11
12 int main()
13 {
14
15 v.sd=10;
16 cout<<v.sd;
17 return 0;
18 }
EDIT:
What the actual difference? why it works in c++ and not works in c;