God like vs2013 I'm really drunk

For example:

Write c++ code in vs2013, there are many mistakes like dogs, don't talk about the code

---------------student.h-------------------------------------

#pragma once



class Student
{
public:
Student::Student();
Student(string name,string studentNum,int age, string sex);
~Student();
int getAge();
string getName();
private:
string name;
string studentNum;
int age;
string sex;

};

-------Student.cpp------------

#include "stdafx.h"
#include <string>
#include <iostream>
#include "Student.h"
using namespace std;
Student::Student(){
}
Student::Student(string name, string studentNum, int age, string sex)
{
this->age = age;
this->name = name;
this->studentNum = studentNum;
this->sex = sex;
}
Student::~Student()
{
}
int Student::getAge(){
return age;
}

-------------main---------

// CStudents.cpp : Defines the entry point for the console application.
//


#include "stdafx.h"
#include "Student.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
Student s("wangyu", "201304150114", 18 , "female");
cout << s.getAge() << endl;
return 0;
}

The first one said that the string was wrong, I changed it. That's right, by syntax checking. Konima, what do you mean by these errors?

Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 10 1 CStudents
error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 12 1 CStudents
error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 13 1 CStudents
error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 15 1 CStudents
error 24 error C4430: Missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 10 1 CStudents
error 27 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 12 1 CStudents
error 29 error C4430: missing type specifier - int assumed. Note: C++ does not support the default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 13 1 CStudents
error 31 error C4430: missing type specifier - int assumed. Note: C++ does not support default int c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 15 1 CStudents
error 13 error C2671: 'Student::{ctor}': static member function not available 'this' pointer c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 14 1 CStudents
error 15 error C2671: 'Student::{ctor}': static member function has no 'this' Pointer c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 15 1 CStudents
error 17 error C2671: "Student::{ctor}": static member function has no "this" pointer c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 16 1 CStudents
error 19 error C2671: "Student::{ctor}": static member function has no "this" pointer c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 17 1 CStudents
error 32 error C2661: "Student: :Student": no overloaded function takes 4 arguments c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\cstudents.cpp 12 1 CStudents
error 2 error C2535: "Student::Student(void) ”: a member function has been defined or declared c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 7 1 CStudents
error 22 error C2535: "Student::Student(void)": already defined or declared member function c:\users \administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 7 1 CStudents
error 12 error C2511: "Student::Student(std::string,std::string,int,std::string)" : No overloaded member function found in "Student" c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 13 1 CStudents
error 18 error C2227: The left side of "->studentNum" must be points to a class/struct/union/generic type c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 16 1 CStudents
error 20 error C2227: The left side of "->sex" must point to a class/struct/union/generic type c: \users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 17 1 CStudents
error 16 error C2227: Left side of '->name' must point to class/struct/union/generic type c:\users \administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 15 1 CStudents
error 14 error C2227: left side of '->age' must point to class/struct/union/generic type c:\users\administrator \documents\visual studio 2013\projects\cstudents\cstudents\student.cpp 14 1 CStudents
error 8 error C2146: syntax error: missing ';' (before identifier 'studentNum') c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 13 1 CStudents
error 28 error C2146: syntax error: missing ';' (before identifier 'studentNum') c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 13 1 CStudents
error 10 error C2146: Syntax error: missing ';' (before identifier 'sex') c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 15 1 CStudents
error 30 error C2146: Syntax error: Missing ';' (before identifier 'sex') c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 15 1 CStudents
error 6 error C2146: syntax error: missing ';' (before identifier 'name') c:\ users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 12 1 CStudents
error 26 error C2146: syntax error: missing ';' (before identifier 'name') c:\users\administrator \documents\visual studio 2013\projects\cstudents\cstudents\student.h 12 1 CStudents
error 3 error C2146: syntax error: missing ';' (before identifier 'getName') c:\users\administrator\documents\ visual studio 2013\projects\cstudents\cstudents\student.h 10 1 CStudents
error 23 error C2146: syntax error: missing ';' (before identifier 'getName') c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 10 1 CStudents
error 1 error C2061: syntax error: identifier 'string' c:\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 7 1 CStudents
error 21 error C2061: syntax error: identifier 'string' c :\users\administrator\documents\visual studio 2013\projects\cstudents\cstudents\student.h 7 1 CStudents


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325732476&siteId=291194637