(抱歉英文不好)
嗨,大家好 !
我的程序不想运行因为错误,谢谢你,帮助我.
我的来源:
main.cpp中
#include
#include
#include
#include
#include
#include
#include "function_h.h"
using namespace std;
int main()
{
int reponse(0);
ifstream myfile("dico.txt");
cout << "1. Mode solo | 2. Mode multi" << endl;
cout << "> ";
cin >> reponse;
if (reponse > 0 || reponse < 3)
{
cin.ignore();
if (reponse == 1)
{
}
} else { cout << "Une reponse valide." << endl; }
}
function.cpp
#include "main.cpp"
#include "function_h.h"
using namespace std;
string Melange(string mot)
{
int position(0);
string result;
while (mot.size() != 0)
{
result += mot[position];
mot.erase(position, 1);
}
return result;
}
function_h.h
#ifndef FUNCTION_H_H_INCLUDED
#define FUNCTION_H_H_INCLUDED
using namespace std;
string Melange(string mot);
#endif
谢谢