51,593 Topics

Member Avatar for
Member Avatar for rbrt13

I am currently making an IRC bot in C++, and i am getting an error from trying to bind the socket, error 10049: WSAEADDRNOTAVAIL. I am new to sockets in C++, so I was wondering what I did wrong. I am running Windows Vista Home Premium and compiling with Bloodshed …

Member Avatar for Salem
0
320
Member Avatar for sara9111

Where is the wrong??? Why does not this program work?? [code=cplusplus]#include <iostream> using namespace std; // Function prototypes. int resverseDigit (int); int main() { int num; // Test function resverseDigit(num). cout << "Enter the number: " << endl; cin >>num; return 0; } // End of main // Function Definitions …

Member Avatar for mrnutty
0
129
Member Avatar for 4101

I need help.... I have a problem about the program/code for the recursive function for power...for example b to the n power, where b is a float and n is an integer... thank you...hope you can help me with this... I need it tomorrow...

Member Avatar for siddhant3s
0
95
Member Avatar for 4101

please help me with my exercise... please give me sample on recursions with Fibonacci and Lucas number... thank you very much....

Member Avatar for 4101
0
106
Member Avatar for licktress

Hey guys. I am trying to make a program that prompts the user to enter in a directory path, and then the program goes to that directory and displays what is inside. [CODE]string cString; cin >> cString; system("cd " cString); //this is what i am having trouble with. system("DIR"); system("PAUSE");[/CODE] …

Member Avatar for Ancient Dragon
0
219
Member Avatar for MV89

I am trying to define an abstract overridable method isKnownWord(), i am recieving errors but i cannot see where they are coming from. Can any one enlighten me. [CODE]public: spellChecker() { wordList=NULL; } void addWord(char* aWord) { int word_size=strlen(aWord) + 1; char* dest=new char[word_size]; strcpy(dest,aWord); wordRecord* newRec=new wordRecord; newRec -> …

Member Avatar for JasonHippy
0
164
Member Avatar for licktress

Hey guys. I am using windows xp, and Bloodshed Dev C++ compiler. I am making a simple program. The CPP file and EXE file work fine on my computer, but do not work on any other computers, no matter what OS (Ive tried on xp, vista, linux and 7). When …

Member Avatar for JasonHippy
0
95
Member Avatar for mat1989

Hey Everyone. Does anyone recommend any particular book for learning c++ ? Thanks.

Member Avatar for Salem
0
138
Member Avatar for gopi17

I'm juz wondering how do I send a single value to a 8-parameter function... [CODE] void enterdata1(int &row1col2) { cout<<"Please enter the number for Row 1-Columm 2"<<endl; cin>>row1col2; if(row1col2 != 1 && row1col2 != 2&& row1col2 != 3 && row1col2 != 4) { cout<<"Please enter the correct number (Which is …

Member Avatar for necrolin
0
152
Member Avatar for lotrsimp12345
Member Avatar for Lfmoncur

Hi, I have a problem with a program that shows the contents of a file, but when it process the data to figure out the sum, max, min and average, that values are wrong. Any ideas? Thanks Liam [code]// CO1401 Reassessment 2008/9 //Liam Moncur BSc Computer Networking #include <iostream> #include …

Member Avatar for Salem
0
121
Member Avatar for shikamaru

Hi friends, I am planing to create and vb.NET application in which i have to call some existing vc++ codes... :rolleyes: After some initial reading i found i have to create some .dll and then call them.. but i cant able to do so with existing big code.. I need …

Member Avatar for GeekByChoiCe
0
55
Member Avatar for lotrsimp12345

I understand the concept but i don't know when to use and what my teacher expects when he says overload certain operators.

Member Avatar for lotrsimp12345
0
183
Member Avatar for D.JOHN

I am still new with fstream topic and I have some enquiries about using it. Based on the tutorial shown, I managed to understand a little about it but when I copy the first few lines, #include <fstream.h> void main { ofstream file; file.open("file.txt"); //open a file file<<"Hello file\n"<<75; //write …

Member Avatar for D.JOHN
0
141
Member Avatar for JackDurden

I was wondering if you guys might help me figure out how to make a vector of vectors like so, The user will name the set say 'A'. And then using 'A' as a key you can then find the set name and add say 'a', 'b' to it. How …

Member Avatar for Ancient Dragon
0
187
Member Avatar for sdmahapatra

Hi everyone I couldn't find the actual logic behind below two problems: [code](1) how to capture number of occurrences of 3 between 1 to 100? and (2) assigns a function to a pointer and subsequently call it.[/code]all problems are in c++ As I'm new in this field so,please help me …

Member Avatar for mrnutty
0
126
Member Avatar for Icebone1000

I cant figure out how make the Button visible proccessing WM_PAINT myself, it just get visible after pressing it.. [code=cplusplus] //THE WM_PAINT message: case WM_PAINT:{ RECT myrect; //get the device contest for the current window------------------- gsp_hdc = GetDC( hWnd ); if( !gsp_hdc ){ MessageBox( NULL, TEXT(" Error Getting DC!"), TEXT(" …

Member Avatar for Frederick2
0
720
Member Avatar for Nathan Campos

Hello, I'm learning C++ and i want to know how i can build a program written in C++ that can execute other programs, like firefox. Thanks, Nathan Paulino Canpos

Member Avatar for chiwawa10
0
105
Member Avatar for Nathan Campos

Hello, I'm learning C++ and i want to build a simple program that copy files, remember that i want a program that copy all types of files, not only *.txt or only binary files. Thanks, Nathan Paulino Campos

Member Avatar for Nathan Campos
0
152
Member Avatar for JackDurden

I have a vector which i wish to fill with char's, so that each char is then a pointer to a vector. vector<char> list; list[0] = 'A'; list[1] = 'B'; How do I make 'A' and 'B' pointers to other vectors? [CODE] void Create_Pointers(char pointer_name) { pointer_name = new vector<char …

Member Avatar for daviddoria
0
121
Member Avatar for NimaJ

Hi, I'm trying to read the HTTP URL string using C++, and I was wondering if it is possible. Here is my situation: There is a server listening to a socket. This socket receives an HTTP Request such as: [url]http://localhost/MyApplication[/url] ? userID = x All I need to do is …

Member Avatar for jen140
0
170
Member Avatar for Nathan Campos

Hello, I'm building a cp like program and here is the code of the file copy, i'm in the beginning, i'm going to put the error messages when i be in some good state of the program: [code]#include <iostream> #include <fstream> using namespace std; int main( int argc, char* argv[] …

Member Avatar for Nathan Campos
0
100
Member Avatar for papanyquiL

I can't get this code to work... [code=c++] typedef bool (* ProcessCallback)(DWORD ProcessId, DWORD ParentProcessId, TCHAR * Path, void * ImageBase, DWORD ImageSize); bool EnumProcesses(ProcessCallback Callback); // --------- class cProcessList { public: struct sProcess { DWORD ProcessId; TCHAR Path[MAX_PATH]; }; std::vector<sProcess> List; bool operator()(DWORD ProcessId, DWORD ParentProcessId, TCHAR * Path, …

Member Avatar for Ancient Dragon
0
214
Member Avatar for harry010

Hi, I've written a program that uses two objects that look like the ones below, and I was wondering why i would need an assignment operator and copy constructor for either of these classes. Are strings like[ICODE] char*[/ICODE] (dynamic memory)? It would not be difficult to write these methods, I'm …

Member Avatar for harry010
0
196
Member Avatar for daviddoria

There is a pure virtual const function declared like wayyyy up the inheritance hierarchy that I need to override, but I would like to override it with a non-const function. I tried and it just complained that the pure virtual const function const was not implemented. I got around it …

Member Avatar for daviddoria
0
420
Member Avatar for goody11

How do I make a line of code such as this possible? [code] LTEXT spnV,IDC_STATIC,57,10,200,8 [/code]

Member Avatar for goody11
0
75
Member Avatar for agaba

input qty while qty > 0 input size call Calculate Scrap using 10 to get scrap 10, qty needed for 10 call Calculate Scrap using 25 to get scrap 25, qty needed for 25 call Calculate Scrap using 40 to get scrap 40, qty needed for 40 if scrap 10 …

Member Avatar for mrnutty
0
103
Member Avatar for metdos
Member Avatar for Nick Evan
0
113
Member Avatar for Jintu

Hi, I have a small doubt in C++ assignment. I have been assigned to do seat reservation in a certain foodcourt. I have already done the seat reservation thing using basic array and function. But my program can only do manual seat reservation. Which means the user gets to choose …

Member Avatar for mrnutty
0
230
Member Avatar for metdos

We need a good open source issue tracking program which is compatible with SVN and windows platform. We are developing programs with VS 2005. Do you have any suggestions? Thanks.

Member Avatar for JasonHippy
0
119
Member Avatar for sophie_kiu

question 1 : I know that c++ could write/ read excel file by changing it into csv format. however, if the content of a cell has a "," inside, then we may have problem when we are reading it as the content may be split into two parts. So how …

Member Avatar for Frederick2
0
578
Member Avatar for gretty

Hello My task is to writ a function that takes in a char array & the array size as its parameters & reverses the array contents. I cannot use another array to reverse the contents. I am using insert & erase function to reverse the array,[B] although I dont know …

Member Avatar for mrnutty
0
120
Member Avatar for el33t

In visual c++, what is the difference between these three: WindowClass.style = CS_HREDRAW | CS_VREDRAW; //Found in winmain() UpdateWindow(hWnd); // Also found in winmain() WM_PAINT //It is a switch case in funtion winproc() I unerstand that all three of them does something like to draw/redraw the client window/window. But can …

Member Avatar for Frederick2
0
189
Member Avatar for nihan1

Hi:) I have a problem about DB navigator usage in SQl with borland c++ builder ? How can I use C++ codes with sql?

Member Avatar for twomers
0
151
Member Avatar for dumrat

Hi, I am playing with metaprogramming. I have this problem: [CODE] template<bool f> class A { public: void P() { cout << "f = true" << endl; } void Q() { cout << "Q" << endl; } }; template<> class A<false> { public: void P() { cout << "f = …

Member Avatar for twomers
0
79
Member Avatar for pingvincible

i want to write a little client-server program. one part will be on domain controller and another on user station. Client part must load before user login. it will make some mathematical operations and send the result to server together with username and password. server part must perform the same …

0
38
Member Avatar for kamo10

can someone help me, i want to use c++ and MS-Access as the database so when i use the SQL component instead of the Table i get an error

Member Avatar for Ancient Dragon
0
87
Member Avatar for nrobidoux

For lack of a better workflow I decided to start my project off by focusing on restoring it's state in CWinApp::InitInstance() and saving its state in CMainFrame::OnDestroy() as I put in data structures. One of the items to restore/save is the simulation time. In fact the app pretty much can't …

Member Avatar for nrobidoux
0
507
Member Avatar for dumrat

I have been working with pthread_cond_t and associated functions and I read that usually a mutex is used in conjunction with the condition when calling pthread_cond_wait or pthread_cond_signal/broadcast. The online texts only mention that the mutex is used for 'predictable behaviour'. Does this mean that there's no need to use …

Member Avatar for dumrat
0
105
Member Avatar for ryancfc

Hi all, I'm having trouble debugging with the MinGW Compiler with Netbeans C++. After having lots of trouble getting the make program to work by replacing it with MSYS, I am now in need of help with the debugger. I have downloaded dbg.exe the help has said. I can't even …

Member Avatar for Ancient Dragon
0
100
Member Avatar for helixkod

Current Code: [CODE] void findMode(int *array, int size) { int array2[size]; int count; int x; int mode = 0; for (count = 0; count < size; count++) { x = array[count]; array2[x] = array2[x]++; } for ( count = 0; count < size; count++) { if (array2[count] > mode) mode …

Member Avatar for supergeek60
0
201
Member Avatar for newtechie

Can any one suggest me some online material for "List with static array" example codes ?

Member Avatar for newtechie
0
180
Member Avatar for snvngrc1

[code] #include <iostream> #include<math.h> using namespace std; class Vect3D { friend Vect3D& operator*(double, const Vect3D&) ; friend ostream& operator<<(ostream&, const Vect3D&); public: Vect3D(); Vect3D(double, double, double); const double& operator[](int i) const; double& operator[](int i); Vect3D& operator+(const Vect3D&) const; Vect3D& operator+=(const Vect3D&); Vect3D& operator*=(double); Vect3D& operator*(double) const; bool operator==(const Vect3D&) const; …

Member Avatar for snvngrc1
0
175
Member Avatar for shinegun

Hi im a new visual c++ programmer... i have a program with Form1 and Form2. When i click on a Form1's button Form2 shows and then Form1 hides. But i want to know how can i make Form1 show again when Form2 enters the event Closing. Thanks!! Also how can …

Member Avatar for shinegun
0
74
Member Avatar for Lfmoncur

I have a problem with a piece of code where I ask the user to type in a filename and then I need to store the number contents of the file in an array, and then use whats in the array to find the sum of the numbers, the biggest, …

Member Avatar for daviddoria
0
109
Member Avatar for nigelhoath

I'm having problems updating a multimap. I need to change the key value. I have found various examples but none seem to work. Any help gratefully received. Below a simplified map test bit of code. I had hoped the line between the commented asterisks would do the trick but seems …

Member Avatar for nigelhoath
0
146
Member Avatar for laconstantine

I am very interested in ASM I wana learn write it and read it like a pro.. Now i'm in CLASS issue I want to know how c++ Class definition looks in ASM code.. for example this code [CODE] class MathFuncs { public: int a,b; private: void SetVars(int,int); }MathObject; void …

Member Avatar for kvprajapati
0
108
Member Avatar for barker1889

Ive got a class which i want to use within a c# windows application, It sounds really simple but where do i put the code which creates the class object and the code that uses the class? Ive tried it in most parts of the code but after creating the …

Member Avatar for ddanbe
0
187
Member Avatar for Siddharthsiva

How to link the ws2_32.lib in the visual studio because i am new to this ..so can u help me....

0
39
Member Avatar for Koinutron

I'm a newbie to c++, and as I'm reading my textbook, I'm applying different rules to this program for converting gallons to liters and vice versa, My question is how can I check that the user input is numeric and not a string of characters? I've tried several things with …

Member Avatar for Koinutron
0
144

The End.