Anonymous
🙋
klimi
Hi
klimi
What the fuck is this
klimi
@linuxer4fun @Occupato
Mat
What?
⠠⠍⠥⠓⠁⠍⠍⠁⠙⠽⠥⠎⠥⠋
😕
klimi
klimi
Joe
stupid question but just starting out with c++: I would like to include a header file into mz main.c. after writing it into the main, where do I have to put the actual file?
klimi
Like
klimi
#include <header>?
Joe
yep
klimi
Hust
klimi
And what files do you have
klimi
Just main.c?
Joe
yes. and i have the file rp.h which i need to include
Joe
to use the functions
klimi
Ok
klimi
If it's in the same directory
klimi
Like
- main.c
- rp.h
klimi
You do in main.c #include <rp.h>
Joe
ok thanks GNU I'll try that
klimi
Call me クリミ ^^
Joe
copied haha
Joe
I've got a No file or directory error now.. doesn't seem to find the file
klimi
Show
klimi
Anyway ... I have to go... I'll be back in 45minutes
Joe
ok thanks anyway
klimi
Show error
Roxifλsz 🇱🇹
Roxifλsz 🇱🇹
The angle brackets <> are used only for includes from your system include folder, for including local files from your project quotes "" are used
klimi
Anonymous
First c or c++
klimi
Those are completely different languages
Dima
c++ is like a younger c pal which fell off a mountain
klimi
Hi kitty
Dima
Anonymous
Anonymous
Dima
Dima
What?
depends on what you want, what do you want to do?
Anonymous
Dima
if you learn c it won’t help you with the modern c++ (only if a bit)
Anonymous
Dima
well that’s kinda strange, you can start from C and later move on to C++ and use its minimal subset (only classes without stl and so on)
Dima
Dima
kek
BinaryByter
hi
Mr. COwO2 Preis
hey
BinaryByter
How are you?
Mr. COwO2 Preis
Fine and you?
Riccardo
Guys I'm the same guy that yesterday was having problems with c++ files, can i send my program so you can help me figure out what are my mistakes??
BinaryByter
yes! yes!
Riccardo
Boys and girls*
BinaryByter
xDD
Riccardo
ok
Riccardo
void SaveScore(char name[])
{
fstream scoreFile;
scoreFile.open("scores.sgs", ios::in | ios::out);
int pos, len;
char input[4];
if (scoreFile.is_open() && !scoreFile.eof())
{
scoreFile.ignore();
scoreFile >> input;
len = strlen(input) + 1;
for (pos = 0; score < charToInt(input, len) && !scoreFile.eof(); pos++)
{
cout << "looping\n";
scoreFile.ignore();
scoreFile >> input;
len = strlen(input) + 1;
pos++;
}
if (scoreFile.eof())
{
cout << "eof\n";
scoreFile << name << "\n";
intToChar(score, input);
scoreFile << input << "\n";
}
}
else cout << "fnf\n";
scoreFile.close();
cout << "file closed\n";
}
Riccardo
the couts are not necessary
Riccardo
was using them for testin
Riccardo
i use .sgs (snake game scores) just cause i want to but its a normal .txt
klimi
How ever you would like :)
BinaryByter
BinaryByter
1) what doesnt work?
BinaryByter
2) what do you want it to do?
Riccardo
ok
BinaryByter
3) what have you tried so ffar?
Riccardo
it doesn't write in the file
Riccardo
i wanna write the score in numerical order
Riccardo
i've changed program twice but it is still not working
Riccardo
thougt the problem were the strings
Riccardo
its not completed it should work only if the file is empty for now
Riccardo
ok
Riccardo
i try
Riccardo
ah wait
Riccardo
i might have found the problem
BinaryByter
you didn't reload the buffer?
Riccardo
no i didn't solve it :(
Riccardo
reload the buffer?