49,761 Topics
| |
i am trying to code my sprites to collect items which then display a score in the top left of the screen depending on which items they collect, each sprite has their own item and there is an item which deducts score. However i am at a loss as to … | |
I am getting a few errors on my code. I know my INT and CHAR are not correct. Just not sure where. I am trying to pull data from a file. The data is a day ( and integer 01, 02, 03) a time of day HH:MM, and a level … | |
I have a code, so far I have a problem: what is those mean? error C2143: syntax error : missing ')' before 'constant' line 65 error C2059: syntax error : ')' line 66 error C2143: syntax error : missing ';' before '{' line 67 error C2181: illegal else without matching … | |
Hey guys, i am working with a program to basically read an input for a file and then storing it into a vector. my text file is called Sample.txt and contains data like this.. [CODE]How are you coping with programming? The quick brown fox jumps over me.[/CODE] Here are my … | |
Hi folks, General question here... I'm writing a program which reads a ton of source data, crunches the numbers, and outputs a few nice summary reports. The source data is a lot of individual records: [B]00001,Item1,Item2,Item3,Item4,Item5,... 00002,Item1,Item2,Item3,Item4,Item5,... 00003,Item1,Item2,Item3,Item4,Item5,...[/B] Originally, I created an object called "Record," which stored each Item. But … | |
OK, I've got a [90][10] 2d array. I have a set of pointers that point to the values in the array by column. each column holds different info. It's a payroll file so the zero column of my array corresponds to an employee number. What I want to do is … | |
I have a code present but why do I have three c2447 errors by line 31,43, and 62 ? What are the ways to prevent that code ever present in the c++ system? //This is the software access for the //lowest score test drop at any level //in the system … | |
que.print is not working and I cannot figure out why not I posted a lot of code because I cannot figure out where the error is, I think it is in que.cpp, but I am nto sure what is wrong. Here is the main [CODE]#include "Stack.h" #include "Que.h" #include<string> #include … | |
Hi Every one i m new to MFC programming i have written a program using VC++6.0 the code is #include <afxwin.h> class MFC_Tutorial_Window :public CFrameWnd { public: MFC_Tutorial_Window() { Create(NULL,"MFC Tutorial Part 1 CoderSource Window"); } }; class MyApp :public CWinApp { MFC_Tutorial_Window *wnd; public: BOOL InitInstance() { wnd = … | |
i want to make a single program for operating both server & client. i want my program to run in such a way that when program is launched, server should start listening for requests from other machines. but when i want to send data to other machines, my server should … | |
this is what i'm doing.. [code=c++]cout << "Value:" << endl; cin>>it; //it is int cout<<1; for (pos = v->begin(); pos != v->end(); pos++) { // pos is an iterator and v is a vector<int> if (*pos < it) { v2->push_back(*pos); cout << *pos << endl; } } cout<<2;[/code] This is … | |
Hi friends, I am new to c++, just find this example from the book, but when i try to run in my visual studio,its gives problem. there is no error in the codes, it compile well, and in main screen ask the user to input the selection that they want, … | |
Hello. Please if somebody has the time and willingness to do this program in C++ I would be very happy and grateful. [quote]Define a class Cubic that stores the coefficients of a polynomial of degree 3 in a dynamically allocated array of doubles. Supply the "big three" memory management functions. … | |
Hello all, I'm trying to do this homework assignment but I keep getting an error when it compiles. The problem it has is in the startlotto function but I can't find it. It says that I have 2 errors: "error C2143: syntax error : missing ')' before ';'. "error C2059: … | |
Hi, I was just wondering if there was any way to export the code I've written in Visual Studio to MS Word, by preserving all formatting. Since copy-paste doesn't keep the formatting, I need a way to transfer my original code to Word while keeping the formatting. And, yes, it … | |
Hello, Please disregard any small syntax errors I have made in this question, I’m trying to simplify a program that is many pages long. I have a program that has 2 parts, main.cpp and a form GUI.h. Both have functions that pass variables between themselves and I don't want to … | |
Hello I have little problem with my code. Problem is iterator inner. How can i solve this? My code [code] map <string, map <string, string> > m; map <string, map <string, string> >::iterator outer; map <string, string>::iterator inner; m["John"]["VW"]="Golf"; inner=m.find("VW"); if(inner != m.end()) {cout<<inner->second<<endl;} [/code] Best Regards Danijel | |
I am using Rice-Golumb encoding for image compression. Compression and decompression working perfectly on 12-bit greyscale image. The pixels are saved in a short int type array. But when compressing it is saved in a long int type buffer. My question is If the input is short int type then … | |
Hi I am trying to write a code to draw a sphere centered within a cube using openGL. Yesterday I had written it in such a way that the values of the side length of cube and dia of sphere are give in the code itself.That worked perfectly. Now I … | |
I have a C# dll and a C++ executable. I am using COM to communicate between the unmanaged and the managed layers using COM interop. Everything is fine except for one problem. I have one time consuming operation to be done within the C# dll. I need to notify the … | |
Hi, If I static cast an object of a derived class to its base class, the object's virtual methods should be those of the base class. But this doesn't seem to be the case if I call such a virtual method via another method. The following is an extremely simplified … | |
Hello everybody, I am currently developping a GUI interface game for windows XP. I am currently having difficulty changing the background of a EDIT box created with CreateWindowEx(). It's default background is white (which is the color I want). But the user is not supposed to be able to adjust … | |
hi, i am facing problem at connecting c++ with oracle10g in redhat4 platform can you guide me to solve the problems. if you do that means i will really thank full to you. thank you at advance | |
Hey all, stuck on abit of a problem. I am outputting afew strings to a text file. However when I check the text file it has been automatically split into 2 lines. Is there anyway to force the output to remain in one line or what is the reason for … | |
I've made a Circular List and I need help implementing a simple memory management. It's the first time I'm doing this so I really have no idea where to start. What I want to do is pre-allocate X amount of Nodes that I can use for my list. Only when … | |
[CODE] //************************************************************************************ //function playagain(); //parameters char cAns //resets game variables and board or exits game //************************************************************************************ void playagain(char cAns) { cout<<"would you like to play again?(y/n)"<<endl;//function call depending of the choice of the player cin>>cAns;//sts value to variable do { iTotalMoves=0;//resets # of moves ResetBoard();//resets game array cPlayerSymbol='a';//resets game char … | |
For the following function can one of you guys take a look and see if what I have at the bottom is correct.. [CODE] void f(char ch) { if (('A' <= ch) && (ch <= 'H')) { f(ch - 1); cout << ch; } else cout << endl; } [/CODE] … | |
I figured it out. To return an array you need to write your function as so [CODE] int *foo() {} [/CODE] | |
Good day my masters first let me start by saying that i am a complete novice to c++ programming. i got myself into some trouble while debugging a win32 program in 2008 V.studio. with this code line(with similar lines anyway): ::MessageBox (wndhnd, "Error!", "Exception Occured", MB_ICONINFORMATION | MB_OK); Here's the … | |
I am attempting to read binary data from a server using the Winsock2 API. The following is the code I am using to receive the data. The data is received but doesn't match what it should be. I have tested this by entering the url in my browser and comparing … |
The End.