I declared string array like string pdts[10];
But am getting declaration syntax error.Already i included still am getting the same error. please help me to solve.
my code is
#include<iostream.h>
#include<string.h>
string pdts[10];
I declared string array like string pdts[10];
But am getting declaration syntax error.Already i included still am getting the same error. please help me to solve.
my code is
#include<iostream.h>
#include<string.h>
string pdts[10];
First, if you are in c++ you should do like:
#include<iostream>
#include<string>
Second, either use:
using namespace std;
Or, use fully qualified name std::string
you should use:
using namespace std;
without it, it will give you an error.