Displaying XCode C++ Output in Separate Screen - c++

I am looking for a way to display the output from a C++ program in a separate window. I am just hoping someone could point me in the right direction. Just running a simple count statement and displaying that on a separate pop up screen would be awesome and I could run with it from there.
To hopefully help clarify a little.. Something similar to this would work http://wwww.youtube.com/watch?v=IXtm7cI21vM

Related

Refresh image in command line (C++)

I want to make a game (something like theses) in C++ (Visual C++). Now a graphic game needs to refresh its picture quite often.
I can print around 20 blank lines. This method is unefficient and quite "laggy". What I need is something fast and efficient and that cause no memory problem because the game will process a lot of data (like mouvements, scores, coins...).
I've also tried to use system('cls'). This is quite bad because can "kinda" gives the player an epileptic attack!
Is there a better solution??
Thanks.
The command line has no image output. The only way you can fake it on the command line is the way you have described it.
The way to make a game efficient is to create a window yourself and then draw with DirectX or OpenGL something into that window. Then you can clear it and redraw it. This might not satisfy you at the moment, as it sounds more like a quick project. But in the long run, you will not be happy to "draw" on the command line if you search for efficiency.

QT Phonon Audio jumping bars

Im only here to ask one question. Well im working in an application, but I would like to create that jumping bars, that jumps with the music. I dont know if you understand me, here is an image of what i want to do:
I dont know how to create that bars, so I dont know if you can help me.
Thank you very much.
With Phonon, how can I handle the frequencies?

Redrawing the screen and wiping what was already there

I need some help - I'm trying to create a roguelike using C++, and at the moment, I have a very simple little screen going, with a void() that generates a map, using "#" for walls and "." for floors. It can draw the player by comparing some integers which map the X and Y values of the player.
I even have a little HUD which will display the player's stats.
But, the issue is, this is all being designed using a typical command-console window, and I'm starting to think I'm doing this wrong.
I want the player to move around this big empty room I have, by using the numpad -- this works. By using a Switch, I adjust the X and Y player value and then redraw the screen again.
Here's the issue. This actually redraws the screen all over again: it adds the 20-odd lines all over again, every single time I move. After a few moves, I have a command console window with text going for hundreds of lines.
So what am I doing wrong? Is there a command I don't know about to clear the screen?
Or am I doing this wrong from the start -- for instance, you have to press 'enter' to input your command, something that's not in any other roguelike. I'm a novice programmer, so any and all help is appreciated!
Thankyou!
Edit: Okay, thanks guys, I am now using PDCurses and trawling the docs to work out how to use the thing! Thanks again so much! Somebody please give the guy who suggested this a big tick! :D
What method are you using to draw the screen, just normal iostream? For this kind of work a library called curses is normally recommended. It would let you draw text anywhere on the screen without scrolling or redrawing the entire screen.
I don't know of any reliable way to do it with portability, maybe try looking for some console oriented lib... Anyway under Windows you can still use system("cls");
You can use the ansi escape sequence: printf ("\33[2]").

dynamic drawing in cocos2d?

I am working on a game which would take touch gestures as inputs. Now, i would like to display the path/gesture as the user draws it. Can someone please tell me how to do this in cocos2d?
I tried to override the draw method and used ccDrawPoint(). But the point just keeps following the touch. I guess this is because the previous drawing is getting overwritten.
Can you tell me where i am going wrong here or suggest a better way to implement this?
i found a solution with CCRenderTexture sample test in cocos2d. Though i could not find enough documentation on it, but the sample code is enough for a start.

gui for mpi program

I have a problem about a simple mpi program.This program have some 3D points and these points are moving during the program. I created an simple code by implemented c++ and then I tried to add an simple gui. I used gnuplot library and I have a problem. When I call the gui function the gui is created and it is disappeared at the same time. I mean, point object have x,y,z coordinate and I have an array that includes point objects. I want to create them as gui. Can you help me about this problem?
Thanks for any help..
what about Qt? You could use the Qt Graphics View Framework to simulate the 3D-environment - it even supports coordinate transformation (ok, it was originally designed for 2d scope). It supports OpenGL and maybe you are able to simulate the 3D points by drawing dots and setting their positions using simple cosinus and tangens mathematics.
Don't get afraid of the many functions and classes Qt offers - it's very easy and fast to learn - just check out the simple tutorials and after that you right can start your gui!
...and if you are used to Qt, you'll never want to miss it :)
Could it be that the plot is up correctly but that then your program ends? Ie everything's correct, the window goes up, but the next thing that happens is that the program is done, and the window gets destroyed? Try putting in a couple lines that wait for a keypress right after you throw up the window. Then, the window will stay until you press a key (and then the program will end).