49,761 Topics

Member Avatar for
Member Avatar for new2programming

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 …

Member Avatar for new2programming
0
58
Member Avatar for rowley4

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 …

Member Avatar for daviddoria
0
122
Member Avatar for cl2020

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 …

Member Avatar for NathanOliver
0
132
Member Avatar for gregarion

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 …

Member Avatar for NathanOliver
0
92
Member Avatar for phummon

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 …

Member Avatar for NathanOliver
0
181
Member Avatar for Empireryan

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 …

Member Avatar for NathanOliver
0
102
Member Avatar for cl2020

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 …

Member Avatar for NathanOliver
0
105
Member Avatar for aaronmk2

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 …

Member Avatar for griswolf
0
95
Member Avatar for aiqbal023

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 = …

0
26
Member Avatar for sksingh73

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 …

Member Avatar for Agni
0
71
Member Avatar for Alex_

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 …

Member Avatar for Alex_
0
1K
Member Avatar for mugilan

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, …

Member Avatar for mugilan
0
146
Member Avatar for XerX

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. …

Member Avatar for Swiftle
-2
138
Member Avatar for JStarr

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: …

Member Avatar for JStarr
0
113
Member Avatar for ssmg

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 …

Member Avatar for nbaztec
0
356
Member Avatar for carrythe1

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 …

Member Avatar for nbaztec
0
2K
Member Avatar for d4n1x

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

Member Avatar for d4n1x
0
113
Member Avatar for blackmagic01021

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 …

Member Avatar for Aranarth
0
78
Member Avatar for frispee

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 …

Member Avatar for daviddoria
0
156
Member Avatar for Sudripta

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 …

0
22
Member Avatar for toitoi

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 …

Member Avatar for toitoi
2
110
Member Avatar for Graphix

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 …

Member Avatar for gashtio
0
4K
Member Avatar for vinodpragadeesh

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

0
36
Member Avatar for colmcy1

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 …

Member Avatar for colmcy1
0
78
Member Avatar for Swiftle

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 …

Member Avatar for nbaztec
0
153
Member Avatar for tinanewtonart

[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 …

Member Avatar for tinanewtonart
0
245
Member Avatar for jimJohnson

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] …

Member Avatar for wade2462
-1
92
Member Avatar for wade2462

I figured it out. To return an array you need to write your function as so [CODE] int *foo() {} [/CODE]

Member Avatar for wade2462
0
96
Member Avatar for Osas106

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 …

Member Avatar for griswolf
0
109
Member Avatar for danarmstrong

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 …

0
24

The End.