49,766 Topics

Member Avatar for
Member Avatar for JediMasterBane

I looked through other threads, but could not find on how one would be set up. So my question is, How would you set up a C++ text based game.

Member Avatar for PixelExchange
0
103
Member Avatar for stackOverflow

Hello everyone, Just wanted to know how can i blink a text in C/C++. Should use any graphics function. And i'm supposed to use a TC 3.0 :rolleyes:

Member Avatar for Nick Evan
-1
994
Member Avatar for hardikp.001

i havae made circuit which we can operate from computer. i know c++ but hoe can we programme hardware using c++. any books or links or suggestion regarding to it please reply

Member Avatar for mike_2000_17
0
346
Member Avatar for sashank.thags

Hi I have a problem with my c++ code which is compiled using turbo c++ on vista and the code is: [CODE]outtextxy(99,40,"f"); p=getch(); if(p==27) main(); else if(p=='f') void fig();[/CODE] error is: misplaced else in function i have tried changing to o[CODE]uttextxy(99,40,"f"); p=getch(); if(p==27){ main();} else if(p=='f') { void fig(); } …

Member Avatar for Nick Evan
0
125
Member Avatar for ragoo

hiya, i am new in C++ and need to create a windows form application that at the click of the button the class is called and excecuted. I have done GUI's in java and its no big issue for me, its just that I need the GUI in c++ since …

Member Avatar for ragoo
0
133
Member Avatar for Rez11

I am trying to replace "the" with "that". My original sentence is "the ball is under the car". I can successfully change the first "the". But when I try to change the second "the" string1 ends up being "that ball us under that".So it cuts off the world "car". What …

Member Avatar for StuXYZ
0
204
Member Avatar for Vani3863

Hi All, I'm a relative newbie having trouble completing a program that is required to read the text character by character from a .txt file and to then encode certain characters to something thing else. It is then supposed to be output to a separate .txt What seems to happen …

Member Avatar for Vani3863
0
162
Member Avatar for tehmarto

Hi all, I have a program that loads a dll, uses it for some time and then it unloads it. I have no idea where dll is located or from where it is loaded but I know where dll is unloaded. Loading of the dll is very hardcoded and I …

Member Avatar for tehmarto
0
131
Member Avatar for effizy

I am new to C++ or any form of programming language. Would appreciate any practical tips on: - approaching problems - techniques on writing codes - rule of thumb for writing codes - fixing errors - how to define and use(call) functions - loop - array - float, double - …

Member Avatar for Jackk123
0
138
Member Avatar for xiansen

i am supposed which accepts a five-digit integer value. my program is then to output the digits, one per line. Each line of output should contain the digit value, its square and its cube. Once I have the program running correctly, modify the program so that it will process as …

Member Avatar for xiansen
0
295
Member Avatar for ticktock

Hey all, I am trying desperately to create a cube using VBO. I have the correct vertices that must be used yet when I render it, it only displays one part of the face of the cube (which in this case is a half triangle, since a square is made …

Member Avatar for ticktock
0
2K
Member Avatar for neural_jam

<edit>(scroll down a bit to avoid some rambling and get to the main question!)</edit> Hi there, I'm trying to write a C++ program that repeatedly executes another program (with a system call) that creates a file called 'output', then copies the output into a subdirectory and renames it so that …

Member Avatar for neural_jam
0
166
Member Avatar for y2kshane
Member Avatar for Stefano Mtangoo
0
155
Member Avatar for embooglement

I'm trying to write a to string function that would use std::stringstream to convert the the instance data into a string, but haven't been able to get operator overloading to work with it. As soon as I define a new << operator, I get a bunch of ambiguity errors saying …

Member Avatar for embooglement
0
2K
Member Avatar for low_coder

hey, im making a database program using standard c functions (fopen, fclose...) and i need to read and write data to files quite frequently, so is it better to open (fopen) and close (fclose) the files before and after each operation or open the files at the beginning of the …

Member Avatar for low_coder
0
99
Member Avatar for aikiart

Good day, I've got a question about why program 19-3 won't display a returning message but program 19-2 will. THIS IS 19-2 // This program demonstrates a simple recursive function. #include <iostream> using namespace std; // Function prototype void message(int); int main() { message(5); return 0; } //************************************************************ // Definition …

Member Avatar for aikiart
0
293
Member Avatar for abysss

I am new to thread programming,i basically want to learn how write threads in c++.It would be a great help to me if anyone could guide me through this or provide any tutorial links. thanks in advance sidharth

Member Avatar for abysss
0
144
Member Avatar for pdk123

Hi , Sorry for this basic question, i am stuck, with somethings, I have a class class A{ int * mem_ptr; } then somewhere in the code: if ( mem_ptr == NULL ) { mem_ptr = new int; } Is it safe to assume that mem_ptr is NULL when the …

Member Avatar for wtf4096
0
148
Member Avatar for jonymanolo

i have a big code in c++ and i need do a little change i have the src but when i do a change in the .sln file an try to compile again send me errors about the dlls and other stuff what i need to do? the change i …

Member Avatar for yusuf0024
0
62
Member Avatar for RayvenHawk

Ok I'm working on a DirectX project for an augmentation class and have a quick question. I'm needing to recognize a key being pressed (for example "s) which triggers action (x). I then need to press "s" again to then revert back to the original state. Currently I have an …

Member Avatar for Fbody
0
197
Member Avatar for DavidNeedsHelp

Hi All, I'm getting a segmentation fault that I simply cannot understand. I run gdb and get the following message: Program received signal SIGSEGV, Segmentation fault. 0x00000000004a91a5 in BDD::BandB (this=0x7ffffffe4e60, fixedVars=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at BDD.cpp:550 550 void …

Member Avatar for Fbody
0
185
Member Avatar for dorien

Hi, I have been reading a number of posts about this, but I have not been able to figure it out. I want to write hex to a midi file. The hex code of the midi file looks like this: [CODE]4D 54 68 64 00 00 00 06 00 01 …

Member Avatar for dorien
0
9K
Member Avatar for 333kyle333

The title explains it. I'm running Ubuntu Linux if it matters. I want to be able to take input and pass it to the terminal (bash shell)

Member Avatar for NicAx64
0
85
Member Avatar for raghamayee

Hi everyone, I have written a program which can be performed in two ways...now,i want to compare the times taken by both approaches...can anyone help me how to get it...

Member Avatar for mike_2000_17
0
143
Member Avatar for techie1991

I was having some confusions about string and NULLs. So, I read this [URL="http://www.daniweb.com/forums/thread77987.html"]thread[/URL] on this very forum. But, I could not understand somethings... Firstly, Is NULL an integer value 0, or something else? Secondly, [CODE]if(strlen(str)==0)[/CODE] this shows that the string is null or it shows that the first character …

Member Avatar for Ancient Dragon
0
161
Member Avatar for Rkeast

I've been kicking around the idea of doing a 3d game in my spare time, but I am struggling when it comes to actually setting up an application from scratch in such a manner that the different aspects of the application are separated into different projects in my IDE. I …

Member Avatar for Ancient Dragon
0
172
Member Avatar for daviddoria

Can anyone explain why this doesn't work? [code] #include <iostream> class Parent { public: virtual int Add(int a, int b) = 0; int Add(int a) { return this->Add(a,a); } }; class Child : public Parent { public: int Add(int a, int b) { return a+b; } }; int main() { …

Member Avatar for mike_2000_17
0
217
Member Avatar for pspwxp fan

I'm learning C++ from the book C++ Primer Plus. At the end of the chapter on loops, they want us to design a structure, allocate adequate memory for an array of such structures using new, then feed input data to it. I got this code: [CODE]#include <iostream> using namespace std; …

Member Avatar for embooglement
0
135
Member Avatar for darkroad

Assuming that we enter the integer value is 5689798. Summing up the digits gives 5+6+8+9+7+9+8+8 = 58 that contains more than one digit, so we repeat the process: 5+8 = 13. we repeat until we got one digit: 1+3 = 4 . The final answer is 4. I don't know …

Member Avatar for ananda2007
0
167
Member Avatar for ^Y^ nobody ^Y^

Hi, I'm trying to make a program that search strings in a file and output them (or others). My problem is, how to output a file line !? Here is my code... [CODE]string str; string str2 = "hate"; int i; ifstream file ("file.txt"); for (int index=1; index<=10; index++) { getline …

Member Avatar for amrith92
0
144

The End.