C
contactmayankjain
Hi
Why this code is giving me an error. If I uncomment the commented line
and make my structure global it work fine.
#include <iostream>
#include <stdlib.h>
#include <vector>
using namespace std;
// struct student{
// char name[20];
//int rollno;
//};
int main(int argc, char *argv[])
{
struct student{
char name[20];
int rollno;
};
vector<struct student>stu;
system("PAUSE");
return 0;
}
Regards
Mayank Jain(Nawals)
Why this code is giving me an error. If I uncomment the commented line
and make my structure global it work fine.
#include <iostream>
#include <stdlib.h>
#include <vector>
using namespace std;
// struct student{
// char name[20];
//int rollno;
//};
int main(int argc, char *argv[])
{
struct student{
char name[20];
int rollno;
};
vector<struct student>stu;
system("PAUSE");
return 0;
}
Regards
Mayank Jain(Nawals)