49,761 Topics

Member Avatar for
Member Avatar for Ameerah

hi, please helpe me my code include one problem and i dont know how to slovet the heder [ICODE]#ifndef COURSE_H_ #define COURSE_H_ #include <iostream> using namespace std; #include<string> using namespace std; class Course { private: string id; int NumberOfCredits; static string serialId; public: Course(string corsename) { } void print() { …

Member Avatar for Lerner
0
139
Member Avatar for noexit

Hello, this is my first post so be nice :) After hours of trolling various forums and websites along with a few books i've decided to ask for help. I've put together the whole of the program which is to carry out a few simple processes using inputted data and …

Member Avatar for Lerner
0
115
Member Avatar for cout<<"alias"

Hi there, been working on a small program that will loop a function which adds two integers until the user enters 00, but can't seem to work out the finer details. A little newer to C++, don't need a complete answer but any advice would be much appreciated [code=c++] #include<iostream> …

Member Avatar for cout<<"alias"
0
384
Member Avatar for anupamsps

hi friends; i am trying to build a class using multimap, the idea is something like this: I have say N no of particles and each particle has fix position in 3d space something like this: Coordinate: Particle level (1,2,3) ----------------> 1 (1,2,3) ----------------> 7 (1,0,0) ----------------> 2 (0,0,0) ----------------> …

Member Avatar for StuXYZ
0
176
Member Avatar for joeblob17

I am importing object files and making tables from the for a project due tommorow night. The function works fine when I use it the first time i.e. input pro1.txt, but when I call the function again and input pro2.txt as the file name my program crashes. All of the …

Member Avatar for joeblob17
0
85
Member Avatar for cog_bn

When I run the code, what's supposed to happen is that when I input three numbers separated by spaces (e.g. "[i][u]23 4 5 <enter>[/u][/i]"), it outputs "[b]no more input\n\nReady\n[/b]", when I input four or more numbers (e.g. "[i][u]23 4 5 34 65 <enter>[/u][/i]"), it outputs "[b]is more input\n\nReady\n[/b]": [code] #include …

Member Avatar for cog_bn
0
181
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
100
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
494
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
120
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
355
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
649
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
97
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
117
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
179
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
208
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
206
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
178
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
79
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

The End.