Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include <string>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sqlite3.h>
#include "save.h"
#include <sys/stat.h>
#include <fstream>
bool ifile;
bool fexists(const string& filename)
{
ifstream ifile(filename.c_str());
return (bool)ifile;
}
int initDB()
{
string filename = "/home/codio/workspace/game.db";
cout << fexists(filename) << endl;
if(ifile==1)
{
initSave();
cout<<"Enter your name: ";
char name[10];
cin>>name;
cout<<name<<"agdsdgs"<<endl;
saveName(name);
}
else
{
cout<<"Enter your name: ";
char name[10];
cin>>name;
cout<<name<<"agdsdgs"<<endl;
saveName(name);
}
int d = takeArmour(2) +23;
cout<<d<<"d is :"<<typeid(d).name()<<endl;
return 0;
}