49,757 Topics

Member Avatar for
Member Avatar for JohnPhilipps

Good afternoon, I have been working on a simple problem for a long time because I am really not sure how to approach it. I need a user to type in a sentence at a command prompt, after that I trim the String and place it into an array to …

Member Avatar for JohnPhilipps
0
174
Member Avatar for CppBuilder2006

I am writing a Windows API program. I noticed that WM_KEYDOWN message is not sent to the window procedure when I press Alt + Backspace. what message is sent when I press Alt + Backspace?

Member Avatar for mitrmkar
0
78
Member Avatar for gregarion

Hey guys, i am having a problem in my query statement. I am using Mysql in Netbeans and c++. Really Hope for some help. I posted it here as i read up a bit on it and it seems the solution is based on c++. What i am trying to …

Member Avatar for Fbody
0
2K
Member Avatar for timbomo

i keep getting 4 errors on here and i cant figure out what they are I followed the syntax i believe [CODE] } if (( tot_mon <= 0.0f && orig_mon <= 0.0f)) cout << "You need more cash, you dont have enough\n" << endl; else if (tot_mon <= 0); cout …

Member Avatar for Lerner
0
112
Member Avatar for jdpjtp910

I have a program for school. The program is an inventory program. It will start by writing blank records to a file. The user then should have a case drive menu. The user will select an option for what action they desire. Actions are add new record, change record, and …

Member Avatar for dusktreader
0
2K
Member Avatar for TheGhost

i want to make an Object Test to control many threads. Test.cpp [code] class Test{ public: Test(); void exampleThread(void*); }; Test::Test(){ _beginthread(exampleThread, 0, 0); } void Test::exampleThread(void* ptr){ ... } [/code] i get the error [quote] argument of type `void (Test:: )(void*)' does not match `void (*) (void*)' [/quote] what …

Member Avatar for nezachem
0
70
Member Avatar for timbomo

ok how will i keep track of the items i bought? i have not the slightest clue on that. i dont even know where to start. can someone point me in the right direction? [CODE]#include<iostream> using namespace std; int main() { char symb; int item_purch, numb_item_purch, quit,; double mug = …

Member Avatar for Lerner
0
166
Member Avatar for glenc70

how do i create a new instance of a class at runtime? ok say i have a window open and every time i click inside the windows it puts a small image ( which is defined in the class ) at the location of the mouse pointer. But how can …

Member Avatar for Narue
0
96
Member Avatar for walter clark

Is there anyone out there that finds Visual C++ (ver8) Debugger broken? Specifically with regard to variables out of scope. I have asked here about specific problems and none of the proposed solutions work. The debugger works on the easiest of things, but half the time, things that are obviously …

Member Avatar for walter clark
0
100
Member Avatar for yin1031

Hi there I want to use c++ to draw a path The path is based on two variables, x and y and x and y will change automatically every second So I think the flow should be like this: t=0, (x,y)=(0,0) ->draw a point on the graph t=1, (x,y)=(2,2)->draw another …

Member Avatar for yin1031
0
101
Member Avatar for jimFan

Dear all, Forgive me for posting two threads for the same problem. I was not showing my problem clearly enough in the previous one. Thank Narue for answering that anyway. Now I do it again here: [CODE] #include <iostream> #include <string> using namespace std; int main(void) { string inputStr; while …

Member Avatar for Fbody
0
1K
Member Avatar for deetlej1

Hi There, I need assistance with the assert function. The question is convert a date to Julian date and then check which one is the smallest and subtract to show the different days. That is all done. The part I have no idea is how to use the assert function …

Member Avatar for deetlej1
0
158
Member Avatar for IDSTECH

I am very new to C++ and would like to know how to handle the following: Let's say I have a button on a form. When the user clicks the button, a new textbox is created on the form. How can I add event handling for this new text box? …

Member Avatar for IDSTECH
0
85
Member Avatar for cwarn23

Hi and I have a hex to int function but it isn't converting the hex to integers properly. Below is the code an example is the hex bb76e739 which should = 3145131833 but with the function it equals 2147483647. I heard sprintf or something like that can convert the hex …

Member Avatar for mrnutty
0
181
Member Avatar for scott6480

In my assignment I am supposed to use a pointer to create a 2-D array dynamically. Initialize each element in the array to the sum of its row and column. Then display each element of the array on the console. I have the program written and it works except for …

Member Avatar for vmanes
0
144
Member Avatar for halluc1nati0n

Tried this on my UNIX box.. Why aren't the array contents being stored/displayed ?? [CODE]#include <iostream> #include <fstream> #include <unistd.h> #include <sys/signal.h> using namespace std; int main(int argc, char *argv[]) { int pid; pid_t pid_chk; int pid_array[2]; int count[25], length, i, j; for (i=0; i<3; i++) { pid_array[i] = 0; …

Member Avatar for vmanes
0
149
Member Avatar for heredia21

int main() { recurse(5,3); return 0; } // end main void recurse(int x, int y) { if (y > 0) { ++x; --y; cout << x << " " << y << endl; recurse(x, y); cout << x << " " << y << endl; } // end if } …

Member Avatar for Salem
0
105
Member Avatar for nola_Coder

I am making a pong-like game for a class. I am having trouble with the ball's collision detection. The game is a 1 player version, where the ball and paddle are both contained in a box. The player uses a gun which is built into the paddle, in order to …

Member Avatar for nola_Coder
0
91
Member Avatar for Lukezzz

I use a panel and if the user Leftclicks an area with the mouse, I am trying to set the variable LeftRightClick to "Left" and the same for rightclick, "Right". Then I call the button43_MouseDown event to show the correct MessageBox, depending on if it was a leftClick or RightClick. …

Member Avatar for jonsca
0
174
Member Avatar for jesoj

Hi All, Can anybody help me to assign a base class function pointer in derived class constructor? I have got a compilation error while doing so. Please see the code below: [CODE]class Base { public: void (* fnptr) (void) ; void myvurtualfn() { } }; class Derived:public Base { public: …

Member Avatar for jesoj
0
1K
Member Avatar for heredia21

[code] int main() { string s = "12a34b56c78d"; int size = 12; writeStuff(s,size); return 0; } // end main void writeStuff(string s, int size) { if (size > 0) { cout << s.substr(size-1, 1); writeStuff(s, size-3); } // end if } // end writeStuff[/code] What is supposed to be the …

Member Avatar for Ancient Dragon
-1
70
Member Avatar for heredia21

#include <iostream> using namespace std; int num, factorial; num = 6; factorial = Fact(num); cout << num << "! = " << factorial; return 0; } // end main int Fact (int num) { if (num == 0) return 1; else return num*Fact(num-1); } //end Fact int main() What is …

Member Avatar for heredia21
0
67
Member Avatar for corby

i need help creating a rectangle where the user creates the border and fills in the empty space with any symbol they want. it should look like this ####### #@@@@# #@@@@# #@@@@# ####### mine only looks like this # @@@@@ # @@@@@ # @@@@@ any help??? heres my code: char …

Member Avatar for corby
0
178
Member Avatar for mrackley86

New to templates and lists but i have to use them for a class project. I got it working in one file then i tried to make it a class and I keep getting this error: 1>c:\users\r4ck13y\programming\c++ projects\project2.1\project2.1\merginglists.h(11) : error C2955: 'std::list' : use of class template requires template argument …

Member Avatar for mrnutty
0
175
Member Avatar for db132074

Hi, I'm having a problem with displaying names from a text file. I'm passing the names from the text file to an array that will be sorted, but I'm not getting the names to show like I want them to. It should display the different names as Last, First But …

Member Avatar for NathanOliver
0
917
Member Avatar for timbomo

How would i keep track of money spent? and items bought when i loop and how do i say i want multiple items meaning if i want to purchase more than one teeshirt or mug. /* SIUE's bookstore is having aspecail sale on tiems embossed with the cougar logo. For …

Member Avatar for timbomo
0
114
Member Avatar for nsjoe

Can someone quickly point out what the problem is here? I'm sure it's something small but I've been coding for too long to see it. The problem is that in the balance method call, the first parameter is an array. if I hard code a test array, or if I …

0
58
Member Avatar for Lukezzz

I have a panel called panel1. What I wonder how it is possible to do is that when you click the mouse on the [B]location 304,369[/B] in the panel, I want to display a messageBox. How would that be possible to identify the location in code ? [code] private: System::Void …

Member Avatar for Lukezzz
0
510
Member Avatar for ppotter3

Hello, I am working on a program that takes an integer array filled from a random number generator. These values are suppose to be from -5000 to 5000, 2500 of them. Then I want to find the standard deviation of the numbers in the array. I am required to use …

Member Avatar for ppotter3
0
1K
Member Avatar for clayton797

I've been trying to fix this error for a while now, I could really use some help. C:\Users\Clayton\Documents\CH4P11.CPP(71) : error C2676: binary '>>' : 'class std::basic_ostream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined operator code: #include <iostream> #include <iomanip> using …

Member Avatar for Duoas
0
463

The End.