49,761 Topics

Member Avatar for
Member Avatar for greyghost86

Little trouble here using enum in my program I took a section of my program to show maybe one of you have a suggestion in why I am getting an infinite loop here. I have the following statement: `enum food {Pizza=10, Lasagna=20, Chips=2, Burrito=5};` case 'c' : case 'C' : …

Member Avatar for CoolGamer48
0
115
Member Avatar for Wiki_Tiki

I need help creating an elapsed timer with visual C++ 2008. Basically what I want to do is have elapsed time in seconds, minutes and hours tick down on a 'label' control. I've gotten it all set up, including the code for starting the timer ( this->tim_main->Enabled = true; ) …

Member Avatar for mcriscolo
0
373
Member Avatar for pastryman

The following code snippets are from the NxOgre libraries. I'm coming from a Java background, and statements like the following just confused me: [code=c++] Body* body = NxNew(Body)(identifier, this, firstShapeDescription, pose, params); [/code] What's happening on the right side of the equals sign? Is NxNew the class? Is (Body) a …

Member Avatar for ArkM
0
123
Member Avatar for redrum237

hey, i have made a game called zombie island. this is what needs to be included in the game: This is a simple turn based game. Set up a 2d grid. Onto the grid randomly position holes, zombies and a man (each represented by a simple character e.g. O Z …

Member Avatar for redrum237
0
144
Member Avatar for newfigther

Hi all I need to access RS232 device across a network (actually it is only the device but connected to serial/ethernet device which in turn connected to a Hub), would you please direct me how to do it? any help is appreciated.

0
47
Member Avatar for obsolucity

I am having some trouble wrapping my head around this project. I am needed to code a relational database in C++ making use of the sql selection and projection operators. I can use a 2d array to create the 'database'. Please, if anyone could just point me in the right …

Member Avatar for mcriscolo
0
1K
Member Avatar for peyman_k

Is there any built-in/ 3rd party libraries in C++ or any windows API that I can use to capture audio in windows? Thanks, Peyman

Member Avatar for peyman_k
0
90
Member Avatar for kux

first model: [CODE] class MyException { string message; public: MyException( string msg ): message( msg ) {}; void printmsg() { cout<< message <<endl<<endl; } }; void willthrow() { throw MyException("mk"); } int main(int argc, char * argv[]) { try { willthrow(); } catch( MyException &ex) { ex.printmsg(); } } [/CODE] …

Member Avatar for ArkM
0
105
Member Avatar for dipumali
Member Avatar for CoolGamer48
0
69
Member Avatar for karang

Hi I am using a function InitDocStruct() to initialize the document I want to print through my program. Definition of the function is [code=c++] void InitDocStruct( DOCINFO* di, char* docname) { // Always zero it before using it. memset( di, 0, sizeof( DOCINFO ) ); // Fill in the required …

Member Avatar for mitrmkar
0
126
Member Avatar for ambarisha.kn

I am reading 4 bytes in binary file and stored in some variable named as *tmpbuf. i am printing this variable in decimal value like this. printf("%d",*tmpbuf); But now what to do is i want to split 4 bytes into two and want to read those separately and saved in …

Member Avatar for mcriscolo
0
155
Member Avatar for phouse512

Hello, I've been wanting to learn C++ but I don't know the difference between Visual C++ and C++, is there really even a difference? Also, what would be the best compiler for me to start off with if I wanted to learn C++? Thanks

Member Avatar for phouse512
0
245
Member Avatar for robertmacedonia

Hi , can anyone tell me what does this error mean? s\visual studio 2005\projects\igrabobi\igrabobi\Form1.h(124) : error C2451: conditional expression of type 'void' is illegal ? I got it when I tried to build my game. Thanks a lot

Member Avatar for robertmacedonia
0
140
Member Avatar for soroush68

I modified it by visual studio 2005 and it works with it correctly but i has errors by my old compiler(borland C++ 5.02). errors in the last code was caused by using clrscr(),gotoxy() & ... ,that functions was for just borland and was not standard. Does new code of this …

Member Avatar for soroush68
0
184
Member Avatar for Brent.tc

Hi, I was wondering how to program a device driver for Windows XP in c++. For example, say I wanted to make a device driver for a mouse (I say mouse because that seems like one of the most simple everyday 'tools', and would seem as though it were the …

Member Avatar for Nick Evan
0
238
Member Avatar for karang

Hi I am using Dev C++ for my development purpose. I have few queries 1. Can I use it for making professional applications. 2. Is Dev C++ is same as Visual C++. Kindly advice Regards Karan

Member Avatar for Alex Edwards
0
108
Member Avatar for brk235

Hallo friends i have wrtten code for my project in c++, but i have no idea about how GUI is used eith c++ and which one is used. For the beginner i have no idea about GUI and how to start it. Which one you prefer to use with c++ …

Member Avatar for Ancient Dragon
0
92
Member Avatar for klactose

Hello, I am wondering how do we initialize a vector (or even an array) of pointers when the objects that will eventually be pointed to don't exist yet? I've been searching the internet for a while, but most examples assume that the objects already exist. I hope this won't be …

Member Avatar for klactose
0
6K
Member Avatar for rtwister

i started making a game using c++ and allegro, but i keep getting a error can some one please help me out this is the code [code] #include <iostream> #include <allegro.h> #include "PlayerClass.h" #include "Global.h" using namespace std; #define LEFT 4 #define RIGHT 6 #define UP 8 #define DOWN 2 …

Member Avatar for CoolGamer48
0
73
Member Avatar for 11silversurfer1

this really weird thing is happening when i try to find my mouse position of my window. If i put it to the top left of the window it is fine but as it goes further down and across it goes weird. It is really hard to explain, but is …

Member Avatar for 11silversurfer1
0
299
Member Avatar for franziss

What does this error message mean? Thank you for your help Heap corruption detected at 0072FB10 HEAP[algo.exe]: HEAP: Free Heap block 72fb08 modified at 72fb1c after it was freed Windows has triggered a breakpoint in algo.exe. This may be due to a corruption of the heap, and indicates a bug …

Member Avatar for franziss
0
1K
Member Avatar for gangsta gama

Hello. I have c++ down pretty good. I am wondering If I should do windows programming first or directx first. And where should I go to get free or cheap, and good ebooks for windows programming and directx. I cant seem to find any good ebooks. Thank you.

Member Avatar for gangsta gama
0
127
Member Avatar for Wiki_Tiki

Hi, I need help, cuz I don't have a clue how to program printers or anything. Here are the components I have (in terms of this subject): Main.h (Form) btnpgsetup (Page Setup button) btnPrint (Print Button) txtdisplay (RichTextBox) PrintDocument1 (PrintDocument control) pageSetupDialog1 (Page Setup) PrintDialog1 (PrintDialog control) What I'm trying …

Member Avatar for Ancient Dragon
0
100
Member Avatar for Wiki_Tiki

Hi, I've been trying this for months now, and I still can't figure out how to get MFC installed as part of Visual C++ 2008. Is there any service pack you can download? How do you get MFC (Microsoft Foundation Classes) installed?!? Thanks.

Member Avatar for Wiki_Tiki
0
132
Member Avatar for gangsta gama

I am practicing my arrays, and I am trying to make a number/letter tic-tac-toe game. Here is my code: [CODE=c++]#include<iostream> using namespace std; char board[3][3]; char letterNum; void displayBoard(); void move(); void displayBoard() { for (int i = 0; i < 3; i++) { for (int j = 0; j …

Member Avatar for gangsta gama
0
259
Member Avatar for Nemoticchigga

I am trying to put the contents of a char buffer[512] into a word* (type def as data type short). How do I do this? I have tried memcpy but am either getting an exception or it will run but the word* is undefined value after the copy. Any advice …

Member Avatar for Ancient Dragon
0
99
Member Avatar for ninjaneer

I have a C++ dll that I am trying to call in another section of code (happens to be C#) currently I am getting the following error: [COLOR="Red"]Additional information: Unable to load DLL 'MATLABThreadLibrary.dll': The specified module could not be found. [/COLOR] even though I believe I've got all the …

Member Avatar for ninjaneer
0
233
Member Avatar for MLT1988

Last semester I took CSII and we built an unsorted list (C++). This summer I went thru the textbook and built an sorted list, and now I'm trying to template the sorted list, but i keep getting compiler errors like this... : undefined reference to `SortedType<float>::SortedType()' /tmp/cc0C4kB6.o(.text+0x448): In function `main': …

Member Avatar for MLT1988
0
147
Member Avatar for Wiki_Tiki

Hi, I'm busy working on a word processor, and I could use a bit of help with 2 things. The Savefiledialog, and the Openfiledialog. In terms of the savefiledialog, I have all the code done, and it compiles properly: [CODE]public: void SaveFile() { SaveFileDialog^ saveFile1 = gcnew SaveFileDialog; saveFile1->DefaultExt = …

Member Avatar for Wiki_Tiki
0
106
Member Avatar for Wiki_Tiki

Hi everyone, I need help with this one problem. I'm using Visual C++ 2008, Windows Forms app, and I've created a test program where you can set up two system::strings, xvalue and yvalue. It then converts them to Ints (x and y). It then calculates x and y depending on …

Member Avatar for ArkM
0
120

The End.