49,757 Topics

Member Avatar for
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
104
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
352
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
35
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
151
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
240
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
Member Avatar for neoxyn

#include <mysql.h> and [code]//try to make connection to database MYSQL *connection, mysql; MYSQL_RES *result; MYSQL_ROW row; int query_state; mysql_init(&mysql); connection = mysql_real_connect(&mysql,"http://1.1.1.1","user","password","database name",0,0,0); if (connection != NULL) { cout << "database connected \n"; }[/code] this code gives me 1>main.obj : error LNK2028: unresolved token (0A000294) "extern "C" struct st_mysql * …

0
26
Member Avatar for CppFTW

Hi, I was wondering if the compiler Visual C++ is smart enough to optimize code like this: [CODE=C++]string temp = "abcd"; string temp2 = "hahaha"; string temp3 = temp + temp2;[/CODE] "temp + temp2" can be replaced by "abcdhahaha" [CODE=C++]vector<char> alphabet; for (char i = 'a'; i <= 'z'; i++) …

Member Avatar for CppFTW
0
160
Member Avatar for denkfix

Hi, I am trying to convert a single wchar_t to uppercase. In theory it should work as shown below, in practice it does not. I have no idea what I am doing wrong. Any ideas? Output is: T T ? ? [CODE] #include <locale> #include <string> int main ( ) …

0
84
Member Avatar for John Linux

What is a pre-processor macro and how is it processed by the C++ system? Demonstrate a potential problem with this approach by referring to the macro [CODE]#define SQR(t) t*t[/CODE] what is wrong here... besides the fact that if you put a type that cant use the * operator you'll get …

Member Avatar for Banfa
0
84
Member Avatar for dimios

Hi everyone, can you help me please with then following?? a)The C++ Standard Template Library (STL) contains a number of container data types, explain with suitable examples the advantages these give to the programmer over a procedural language such as C. b)Demonstrate using suitable code the usage of the STL …

Member Avatar for bandtank
0
216

The End.