Xin chào mọi người,
Mình tạo 1 class hello theo nội dung bên dưới :
hello.h
#pragma once
#include<iostream>
class hello{
public:
void howareyou(){
std::cout << “How are you ?” << std::endl;
}
};
hello.cpp
// #include
<hello.h> // BAO LOI
#include<C:\Users\Win 8.1 VS8 X64\Documents\Visual Studio 2013\Projects\Project8\Project8\hello.h>
source.cpp
// #include <hello.h> // BAO LOI
#include<C:\Users\Win 8.1 VS8 X64\Documents\Visual Studio 2013\Projects\Project8\Project8\hello.h>
void main(){
hello man;
man.howareyou();
system(“pause”);
}
Nếu mình để #include <hello.h> thì nó sẽ báo lỗi, còn để nguyên đường dẫn của file hello.h thì không sao ? Mọi người xem giúp mình. Tiện thể mình muốn hỏi về công dụng của file .h và file .cpp khi tạo class. Xin cảm ơn 



83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?