49,761 Topics
| |
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' : … | |
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; ) … | |
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 … | |
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 … | |
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. | |
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 … | |
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 | |
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] … | |
I want to store multiple objects in file but only able to store one object.. plz help me | |
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 … | |
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 … | |
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 | |
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 | |
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 … | |
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 … | |
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 | |
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++ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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': … | |
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 = … | |
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 … |
The End.