Computer Science help

Hi guys!
I have a test on computer science tomorrow. It's basically the basics of C++, so if any of you guys are willing to help me, send me a message!
Comments
17
my final project for my python course due today and im barely started.
OK STFU GONNA START STUDYING
Parent
let me know how it goes lol
Parent
didn't finish it on time but emailed professor and told him my laptop died and couldnt finish so i got an extra 2 days to finish :D
Parent
no u didnt! :D well hardcore study then and make it ;p
Parent
plekter
nerds studying computers in school xDDD
test as in tell me what this program does or take data from.., make program that uses data to do.....?
Teach me how to open and edit date files.
How to bubble sort?
How to use arrays. Type my name backwards, etc..
What is in cin.get and cin.ignore
Parent
FILE *fp;
fp=fopen("lammas.txt","r");
if(!fp)return 1;
// and well u can find rest out in inet


http://mathbits.com/mathbits/compsci/arrays/bubble.htm

#include <iostream>
#include <string.h>

using namespace std;

int main()
{
string e = "lammas";
cout << e << endl;
for(int i = (e.length() - 1); i != -1 ; i-- ) {
cout << e;
}
return 0;
}

for int u need to be more creative

gets console input(http://www.cplusplus.com/forum/general/465/), and ignore ignores '\n' - endline(http://www.cplusplus.com/forum/beginner/9148/)
Parent
mate -_-'
I need you to explain to me what is going on -_-
Parent
well what u dont understand?
Parent
you have a string and with a for loop you print out charaters backwards with it ;)
Parent
FILE *fp;
fp=fopen("lammas.txt","r");
if(!fp)return 1;

That is C not C++.

http://www.cplusplus.com/reference/iostream/fstream/

The code you posted is wrong aswell. You should be using string::size_type instead of int for indexing strings. While it does not really matter later it might cause problems plus it's just bad coding.

stream.get gets the next char from a stream.

Ignore:
http://www.cplusplus.com/reference/iostream/istream/ignore/
stream.ignore(x, c);
Ignores the next x chars from a stream or until a char c is found.
Parent
well , open and read,

ohh yes, the koma thing ':/

might be but i wanted name spelling and easy array way aswell. and i dont think that he will counter index over int on the test.
Parent
pascal or gtfo
Back to top