49,756 Topics

Member Avatar for
Member Avatar for elsa87

hi everyone..i really need help as fast as possible..i have 14 errors in the program..it is a linked list implementation for reversing a stack using recursion.. here is the code: [CODE]#include <iostream> using std::cin; using std::cout; using std::endl; #include<cstdlib> #include <fstream> using std::ifstream; using std::ofstream; #include"ItemType.h" using namespace std; struct …

Member Avatar for Salem
0
99
Member Avatar for jakeiscrazy

OK so Christmas time is here again and i am thinking about computer controlling my Christmas lights. I understand the easiest way to do so is thru the parallel port. I also understand that this is possible thru c++. I have the dll fill needed but dont understand the code …

Member Avatar for Salem
0
480
Member Avatar for Dannyo329

Ok, Im not trying to be evil or anything but is there anyway I could use C++ to open a website in a window, then record what the user types? So the website is google, and some random guy decides to search up dogs:twisted: , dogs would be recorded some …

Member Avatar for BeyondTheEye
0
116
Member Avatar for pragtos

Well, im just in the learning process of c++ cant seam to make my loop work with 2 simpel choises :( #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; using std::boolalpha; int main() { int start; char choise; char y; y=1; char n; n=0; cout << "whant to run …

Member Avatar for pragtos
0
119
Member Avatar for miepmuts

I was just wondering the following. In my win32 GUI application I have callback functions like [CODE=C++] static BOOL CALLBACK UserInterface::DialogProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) [/CODE] Is it possitble like in my other callback functions to pass a this pointer, so it would look something like this: …

0
83
Member Avatar for ronan_40060

Dear Experts In our application the values that are sent from FRONT end( Java) are stored in a C++ Structure on Unix box and then a remote procedure call is made . To store the values that are coming from front end , Im allocating the memory using operator new …

Member Avatar for ronan_40060
0
307
Member Avatar for ttano173

I need to write a program that asks the user to enter a string and then ask the user to enter a character. The following steps each need to have separate functions... • Check the validity of the character • The program should display the index number of the character …

Member Avatar for ttano173
0
348
Member Avatar for ALAZHARY

Hello, everybody. first, look at the following code: [CODE]#include <iostream> 1 using std::cout; 2 using std::endl; 3 using std::cin; 4 5 double* treble(double); 6 7 int main(void) 8 { 9 double num = 5.0; 10 double* ptr = 0; 11 ptr = treble(num); 12 cout << endl 13 << "Three …

Member Avatar for ALAZHARY
0
645
Member Avatar for karang

Hi I am new to C++ Can anyone please tell me how to refer .lib files in C++ Regards Karan |

Member Avatar for Agni
0
86
Member Avatar for XxAaronxX

Hey I am trying to teach myself C++ and i am having trouble with a measurement converter I am pretty sure my problem is in the line [CODE]Yards = Meters * 1.094;[/CODE] but i don't know how else to write it, this is my code: [CODE]#include <iostream> namespace std; int …

Member Avatar for XxAaronxX
0
95
Member Avatar for Undermine

[B]HEADER..[/B] [ICODE]#include <string> using std::string; class Blackjack { public: Blackjack(string); void Shuffle(); void Intro(string); void InitDeck(Card deck[],int numCards); void PrintCard(int); // void Card(int); private: int deck[52]; //deck of 52 cards. }; [/ICODE] [B]BODY[/B] [ICODE]#include <iostream> #include <fstream> #include <cctype> #include <cstdlib> #include <ctime> using namespace std; const int NUM_CARDS = …

Member Avatar for Undermine
0
78
Member Avatar for Undermine

[B]HEADER FILE:[/B] [ICODE]#include <string> using std::string; class Blackjack { public: Blackjack(string); void Shuffle(); void Intro(string); void InitDeck(); void PrintCard(int); // void Card(int); private: int deck[52]; //deck of 52 cards. }; [/ICODE] [B]BODY PROGRAM.[/B] [ICODE]#include <iostream> #include <fstream> #include <cctype> #include <cstdlib> #include <ctime> using namespace std; #include "bj.h" Blackjack::Blackjack(string name) …

Member Avatar for Undermine
0
126
Member Avatar for Albinoswordfish

As of now I have the below: [code=C++]#ifndef RUNNER_H_ #define RUNNER_H_ #include "Maze.h" #include <QtGui> class Runner{ public: Runner(QColor c); int runnerSize; void setLocation(int,int); void setMaze(Maze); virtual void redraw(QPainter * painter) = 0; virtual ~Runner(); protected: int rXcoor; int rycoor; Maze * rMazePanel; QColor rColor; private: }; #endif /*RUNNER_H_*/[/code] [code=C++]#ifndef …

Member Avatar for Albinoswordfish
0
109
Member Avatar for practica

i have a problem with a mikhail gorbachev trivia game, the number at the end where it tells you how many questions you got right is always wrong but i can't tell why. also how can i reset the radio buttons after each question here is the code [code]#pragma once …

Member Avatar for Murtan
0
113
Member Avatar for VBNick

hi, I'm using this bubble sort to sort the elements in my array right now, but I need something faster. [code=cplusplus] bSorted = false; while(!bSorted) { bSorted = true; for(int e = a_count - 2; e >= a_lbound; e--) { if(a_edges[e + 1].B < a_edges[e].B) { bSorted = false; tmpEdge …

Member Avatar for VBNick
0
173
Member Avatar for chunalt787

I the compiler is giving me the following error on the constructor of graph however it has been defined in the public section. Error [CODE]/tmp/ccku0faq.o: In function `Graph::Graph()': Main.cpp:(.text._ZN5GraphC1Ev[Graph::Graph()]+0x39): undefined reference to `AdjacencyMatrix::AdjacencyMatrix()' collect2: ld returned 1 exit status [/CODE] Here is my code [CODE=CPP]class Graph { private: vector<Node*> nodeList;//list …

Member Avatar for chunalt787
0
178
Member Avatar for Lukezzz

If I would have a file like this path. "C:\\music1.mp3" and a program will play this file. Is it possble in C++ to detect if this file is accessed by that program and notify that in any way ?

Member Avatar for Murtan
0
128
Member Avatar for awthein

Hi, I have a windows service running in my own service framework. Currently, the service can be stopped by using SCM API by sending SERVICE_CONTROL_STOP control code. What I want to do is that the service will ignore the control code unless there is a registry key set (that will …

Member Avatar for Murtan
0
206
Member Avatar for JackDurden

Im trying to count the frequency of words from a file and cant seem to get it to work. My frequency function recognizes the word is there but doesnt return a count for each word yet. The text file would just hold a bunch of random words...please help. [CODE]#include <string> …

Member Avatar for cikara21
0
201
Member Avatar for Lukezzz

I have a general question. Is it possible to write a C++ program that can detect specific frequency tones, like 1 Mhz, 2Mhz 3Mhz etc... Until now I have written standard code in C++ both native and mangaged and can manage the most components etc.. so I have a very …

Member Avatar for Lukezzz
0
177
Member Avatar for Nickyu0712

[code] #include <string.h> class ITEM //here i get the error { private: int price; char name[ 21 ]; int efatr[ 4 ]; public: void setName( char* newname ); void setPrice( int newprice ); void setAtribut( int x, int ef ); ITEM() { name = "Player"; price = 0; } ~ITEM(); …

Member Avatar for Nickyu0712
0
334
Member Avatar for freelancelote

Hi, here is my problem: I'm writing a small program that needs to read a text file and write the words of this text as a list. I could only come up with the little piece of code I wrote below and it's not even working. I believe the problem …

Member Avatar for cikara21
0
136
Member Avatar for PieterN

I'm new to c++ programming and use it to program a microcontroller. Since memory is limitted (only 12 kb), I'm looking for a way to reduce memory usage when using some large arrays with floats that are constants. Is it possible to somehow write these arrays to ROM without them …

Member Avatar for Salem
0
78
Member Avatar for AutoC

Hi, In an assignment I'm supposed to introduce packet errors and bit erasures in the packets.packet errors I can do.Bit erasures mean we have no idea if its a 1 or a 0.how can I introduce something other than a 0 or a 1 in a bit?

Member Avatar for Salem
0
158
Member Avatar for Jason123

1) Could someone explain the difference between composite and inheritance class 2) Is there a composite class with inheritance?

Member Avatar for Alex Edwards
0
787
Member Avatar for minas1

Hi, I'm studying operator overloading through [B]C++ the complete referece[/B] and I've got some questions. In the book, the author writes this: [code=C++] loc loc::operator++() { ++longitude; ++latitute; return *this; } [/code] This creates a new object and returns it. [B]1.[/B]Wouldn't it be more efficient to return a reference? [B]2.[/B]This …

Member Avatar for minas1
0
162
Member Avatar for sisse56

please help me by doing the following program. I want to feed 80 students name,gender and CGPA.and want to sort in two cases.case 1 sorting with respect to their name case 2 sorting with respect to their CGPA. I would stat it like this. ******************************* #include<iostream.h> void main() { char …

Member Avatar for sisse56
0
1K
Member Avatar for mastr924

What is wrong with my code? It repeats the "Enter the next row:" statement more than once for each time its executed. And the characters turn in to brackets. [code] /* * File: fill.cpp * ----------------- * This program gets the perimeter of a closed shape * as an input …

Member Avatar for Lerner
0
108
Member Avatar for kevintse

hi, everyone, i am new to C++, i tried implementing a String. and i need your help, i want to know what to improve for this class regarding performance, or everything else you think i should pay more attention to when implementing such a class for general use(of course, i …

Member Avatar for ArkM
0
126
Member Avatar for sds234

I have no idea ho to write a program for this problem and i am new to C++ so I really needhelp!! Consider the following file called "raw_points.txt". The first line of this file contains a count of how many pairs of coordinates are specified in this file. The remaining …

Member Avatar for StuXYZ
0
135

The End.