Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Lack of ideas for school project (http://www.go4expert.com/forums/lack-ideas-school-project-t21874/)

AnbuRick 23Apr2010 13:50

Lack of ideas for school project
 
Hey, i'm in the final stage of a course who has c++ programming to learn, i gotta do an empty project on win32 console application(it doesn't necessarily need to be that i think,i'm just mentioning cause it's what i'm used to work on,and btw the only thing we have here to work on is microsoft visual c++ 6.0 if that helps on anything at all) with everything we learned(i mean code based,not literally as everything as every single project we did),i have some knowledge on #include<stdio.h>, #include<conio.h>, #include<stdlib.h>, #include<string.h>(to be more specific,printf,scanf,if/else,switch,getch,while,do while,size of,etc(the basics of c++)).
As i typed on the title,i'm outta original ideas on what to do on the project and i'll be grateful to hear any kind of suggestion.

P.S.: I'm a newb as probably anyone well aknowledged on the subject can see by the way i typed this and hoping you don't give a to much complex suggestion if possible even though i'll still be willing to hear cause it might help me snap to a good idea.

P.S.S.: 1 question,how do i change background/text color,i did my research on some commands and don't seem to work or i'm doing it wrong,i think it's simply they don't work on this version of visual c++ but just wondering the code if you can help.

Thank you for reading at the very least.

virxen 23Apr2010 14:47

Re: Lack of ideas for school project
 
for ideas check this one

http://www.sourcecodesworld.com/sour...e.asp?LangId=1

for text color one way is this

Code:

#include <windows.h>
#include <iostream.h>
 
int main(){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 5); //color=5
cout << "Your text here" << endl;
getchar();
return 0;
}


AnbuRick 24Apr2010 01:29

Re: Lack of ideas for school project
 
Thanks for the help dude i think the link is gonna help by what i could see from it,didn't use the code you gave me yet but i bet it'll work but i was just wondering if you knew another way to change the background/text color without the use of iostream. btw i suppose the background is SetConsoleBackgroundAttribute? I'm a complete newbie just saying out loud,anyways a thanks. -clicks thanks box-

Thank you for your time and caring

virxen 24Apr2010 02:14

Re: Lack of ideas for school project
 
Code:

#include <windows.h>
#include <stdio.h>

#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGREY 7
#define DARKGREY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
#define BLINK 128

int main(){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), _rotl(RED,4) | GREEN);
printf("Your text here");
getchar();
return 0;
}

without iostream,for background and foreground color

AnbuRick 24Apr2010 16:30

Re: Lack of ideas for school project
 
Quote:

Originally Posted by virxen (Post 67372)
Code:

#include <windows.h>
#include <stdio.h>
 
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGREY 7
#define DARKGREY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
#define BLINK 128
 
int main(){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), _rotl(RED,4) | GREEN);
printf("Your text here");
getchar();
return 0;
}

without iostream,for background and foreground color

Thank you very much virxen,that helped a whole bunch.

gethighprlinks 25Apr2010 04:34

Re: Lack of ideas for school project
 
Hey friend,
You have choosen a good topic and nicely explained it. Good job.. Keep it up!

AnbuRick 25Apr2010 16:09

Re: Lack of ideas for school project
 
Quote:

Originally Posted by gethighprlinks (Post 67393)
Hey friend,
You have choosen a good topic and nicely explained it. Good job.. Keep it up!

Thanks friend.


All times are GMT +5.5. The time now is 18:47.