Asad Irfan
Asad Irfan

Reputation: 131

String Class Error, can't be added in Class

String class not working in my computer ? This is my code, i hate to create a project over it , is there any syntax error, my book has used exactly like this, whats the problem ?

#include <string>
#ifndef LAB_PROJECT_H
#define LAB_PROJECT_H


struct Node
{
  Node* nextptr;
  Node* prevptr;
  string student_name;
  string father_name;
  int registration;
  string section;
  string major;
 string area;
 };

Upvotes: 1

Views: 55

Answers (1)

Alok Save
Alok Save

Reputation: 206616

You need to use fully qualified name for string for example.

std::string student_name;

Upvotes: 5

Related Questions