Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,212 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 926 people online right now. Registration is fast and FREE... Join Now!




Animation

 
Reply to this topicStart new topic

Animation, C++ Coding

Caribchoc
post 10 Mar, 2008 - 06:53 PM
Post #1


New D.I.C Head

*
Joined: 9 Mar, 2008
Posts: 4


My Contributions


Hi and Good night!

I just started using C++ for the Associate Degree program which I am doing.

Can you please tell me, how do I:-

1 - clear the screen (especially when you using a loop and you want the previous screen cleared before going on).

2 - make text blink/flash on the screen

3 - set/change the color of text and background and foreground colors

Thanks a millions for any help you can offer.

User is offlineProfile CardPM

Go to the top of the page

Jayman
post 10 Mar, 2008 - 07:51 PM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,839



Thanked 38 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


You should check out our Snippets and Tutorials sections. Here is a couple to get you started, I leave it to you to search for the rest.

Color Console
Set Text Color


C++ Tutorials forum
C++ Snippets forum
User is offlineProfile CardPM

Go to the top of the page

Caribchoc
post 11 Mar, 2008 - 12:30 PM
Post #3


New D.I.C Head

*
Joined: 9 Mar, 2008
Posts: 4


My Contributions


Hi Jayman9!

Thanks for your response, now seeing this at work... will try them out tonight after classes.... Peace!
User is offlineProfile CardPM

Go to the top of the page

brandon99337
post 11 Mar, 2008 - 03:36 PM
Post #4


D.I.C Head

**
Joined: 14 Feb, 2008
Posts: 132



Thanked 1 times
My Contributions


QUOTE(Caribchoc @ 10 Mar, 2008 - 07:53 PM) *

Hi and Good night!

I just started using C++ for the Associate Degree program which I am doing.

Can you please tell me, how do I:-

1 - clear the screen (especially when you using a loop and you want the previous screen cleared before going on).

2 - make text blink/flash on the screen

3 - set/change the color of text and background and foreground colors

Thanks a millions for any help you can offer.


For number 1 I use

CODE

system("cls");

can anyone tell me if that's bad?
User is offlineProfile CardPM

Go to the top of the page

KYA
post 11 Mar, 2008 - 03:53 PM
Post #5


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 4,187



Thanked 48 times

Dream Kudos: 1150
My Contributions


QUOTE

Hi and Good night!

I just started using C++ for the Associate Degree program which I am doing.

Can you please tell me, how do I:-

1 - clear the screen (especially when you using a loop and you want the previous screen cleared before going on).

2 - make text blink/flash on the screen

3 - set/change the color of text and background and foreground colors

Thanks a millions for any help you can offer.

It depends, do you want to use the Win API to do your screen calls or directx, or openGl, etc... ?
User is online!Profile CardPM

Go to the top of the page

Caribchoc
post 11 Mar, 2008 - 09:18 PM
Post #6


New D.I.C Head

*
Joined: 9 Mar, 2008
Posts: 4


My Contributions


I got the System CLS to work.... thanks a million.

KYA remember I am new to this... what you just said although it might help in the future, right now that is dutch to me lol.

We had a test tonight. The last question was as follows:
A program is required to allow a user to enter a random amount of positive numbers. Print the sum and average of the numbers. Produce a pseudocode algorithm.

This is what i wrote:

1. ans -> 0
2. avg -> 0
3. sum -> 0
4. num -> 0
5. count -> 0
6. Prompt the user: How many numbers do you want to use?
7. Accept reply and store in ans
8. While num > 0 and count < ans

a. read num
b. sm = sum + num
c. count = count + 1

9. avg = sum/ans
10. Print sum
11. Print avg
12. Stop

User is offlineProfile CardPM

Go to the top of the page

KYA
post 11 Mar, 2008 - 11:08 PM
Post #7


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 4,187



Thanked 48 times

Dream Kudos: 1150
My Contributions


In that case, i wouldn't worry about graphics just yet
User is online!Profile CardPM

Go to the top of the page

Caribchoc
post 12 Mar, 2008 - 06:53 AM
Post #8


New D.I.C Head

*
Joined: 9 Mar, 2008
Posts: 4


My Contributions


QUOTE(KYA @ 12 Mar, 2008 - 12:08 AM) *

In that case, i wouldn't worry about graphics just yet



No, just explain to me what you mean, what they do so I can stay ahead and be current. What ever you folks can teach me or rather that I can assimilate... really, it is greatly appreciated, and I am really eager to learn.

Regards

CC
User is offlineProfile CardPM

Go to the top of the page

MorphiusFaydal
post 12 Mar, 2008 - 07:20 AM
Post #9


D.I.C Lover

Group Icon
Joined: 12 May, 2005
Posts: 1,085



Thanked 8 times

Expert In: Hardware, Networking

My Contributions


He was saying that there is any number of ways to do what you're asking, and it depends on what you're using to display stuff to the screen.

http://www.directxtutorial.com <-- Good Direct3d tutorials.
http://nehe.gamedev.net/ <-- The quintessential OpenGL tutorials.

This post has been edited by MorphiusFaydal: 12 Mar, 2008 - 07:21 AM
User is offlineProfile CardPM

Go to the top of the page

captainhampton
post 12 Mar, 2008 - 07:27 AM
Post #10


Jawsome++;

Group Icon
Joined: 17 Oct, 2007
Posts: 518



Thanked 2 times

Dream Kudos: 825
My Contributions


Gotta crawl before you can walk as well. It really would not be practical to implement graphics in this framework as of yet. Be sure to get the essentials down before you progress further.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/21/08 08:16PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month