49,761 Topics
| |
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() { … | |
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 … | |
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> … | |
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) ----------------> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
Hi I am new to C++ Can anyone please tell me how to refer .lib files in C++ Regards Karan | | |
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 … | |
[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 = … | |
[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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ? | |
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 … | |
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> … | |
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 … | |
[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(); … | |
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 … | |
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 … | |
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? |
The End.