49,757 Topics
| |
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 … | |
#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 * … | |
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++) … | |
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 ( ) … | |
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 … | |
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 … |
The End.