49,755 Topics

Member Avatar for
Member Avatar for Stepes

Hi, I'm new here. I've got a problem with my project. I get the following link error in VS2008 [code]main.obj : error LNK2019: unresolved external symbol "public: __thiscall PSystemManager::PSystemManager(struct HWND__ *)" (??0PSystemManager@@QAE@PAUHWND__@@@Z) referenced in function "public: virtual bool __thiscall MyApp::OnInit(void)" (?OnInit@MyApp@@UAE_NXZ)[/code] main.cpp is for example this: [code] #include "./PSystemManager.h" bool …

Member Avatar for Stepes
0
330
Member Avatar for BradenMurphy

Hi I don't know if there is any simple way of doing this but how can I gather how much data has been sent across the network from a certain IP address....for example say i wish to track how much data my PC sends across the network to my internet …

Member Avatar for ithelp
0
66
Member Avatar for CMacDady

OK I have a function that calls an array of class types and I need to remove any duplicates from the array. That is what the function is for. So I created an operator overload for the '+' operator and made a 'Changebalence()' mutator that add two doubles for me …

Member Avatar for CMacDady
0
96
Member Avatar for wander4heat

class Calendar { public: Calendar(); Calendar(Appointment mname); void AddToCalendar(Appointment mname); void RemoveFromCalendar(Appointment mname); private: vector < Appointment > meetings; }; // Calendar class Appointment { public: Appointment(); Appointment(vector< person > alist, Time stime, Time etime, Date d, Location p); vector< Person > getAttendees() Time getStartTime() Time getEndTime() Date getDate() Location …

Member Avatar for ithelp
0
80
Member Avatar for Undermine

I'm trying to make a shuffler for a blackjack program it's supposed to give me back a random number from a deck of cards each time i call it. But it's also supposed to keep track of cards out of the deck.. I need to make it a function call, …

Member Avatar for StuXYZ
0
589
Member Avatar for elsa87

hi everyone.. i need to ask 2 questions.. first..is the below code done using recursion or not? second..how can i make the below code take input from a text file instead of generating random numbers and make the output go to a new text file? [code=cplusplus] #include <iostream> using std::cin; …

Member Avatar for cikara21
0
507
Member Avatar for sfrider0

I'm trying to figure out how to do template lists. I have this [code] GList<int> list1; GList<float> list2; GList<string> list3; ifstream inFile; inFile.open("data.txt"); while(!inFile.eof()){ [/code] The code keeps going but that is about all that is important. The data.txt consists of ints, floats, and strings, which are separated by "I"'s, …

Member Avatar for StuXYZ
0
76
Member Avatar for karang

HI I am getting this error Error 11 fatal error C1083: Cannot open include file: 'Test/Testnamespaces.h': No such file or directory I have included the following statement in the code using namespace Test; Can anyone please tell me the reason for this .

Member Avatar for Agni
0
238
Member Avatar for preet4fun

[CODE]#include <iostream> #include <string> #include <vector> #include <fstream> #include <iomanip> using namespace std; void getData(ifstream& infile, vector<int>& itemID, vector<string>& itemName, vector<int>& pOrdered, vector<int>& pInStore, vector<int>& pSold, vector<double>& manufPrice, vector<double>& sellingPrice); void do_again(),usersChoice(char ans); void searchInventory(string searchInput); void printReport(); void printHeading(); void sellStock(string sellItem, int numSold); int showMenu(); int ans(); vector<int>itemID, …

Member Avatar for preet4fun
0
166
Member Avatar for Albinoswordfish

I keep this error and i don't know why, right now I have base class Runner which has one virtual function which is overriden in a derived class ghost my code is below Runner.h [code=C++] #ifndef RUNNER_H_ #define RUNNER_H_ #include "Maze.h" #include <QtGui> class Runner{ public: Runner(QColor c); int runnerSize; …

Member Avatar for cikara21
0
87
Member Avatar for Max721

I didnt know i must post code here so sry everyone :). So my problem is next: I have two exes that need to excange data. I tried using standard ::CreateProcess() and ::GetProcAdress() functions but got errors. I presume thats becouse exes are in different processes. I cant use COM …

Member Avatar for Salem
0
119
Member Avatar for Max721

hi all. Im developing project in c++ with dll, exe and GUI application (EXE). Is there any way for GUI to make access to EXE's data without using COM. thanks in advance!

Member Avatar for Salem
0
108
Member Avatar for monotone-mop

This is my first post, and I'm VERY new to C++, but I just finished my first class, and upon requesting the final, I was told to re-do one of my programs, because instead of computing the values, I just displayed them. (It never said I needed to.) Now that …

Member Avatar for monotone-mop
0
125
Member Avatar for tag234

Hello, i have a simple question about pointers... The code that goes with the problem is: [code] int* getPtrToArray(int& m) { int anArray[5] = { 5, 4, 3, 2, 1 }; m = 5; return anArray; } int main() { int n; int* ptr = getPtrToArray(n); for (int i = …

Member Avatar for tag234
0
82
Member Avatar for MJFiggs

Okay, so I've been working on a program that will allow the user to input what items they want into an array and make the output look like this: Item 1. Sword Item 2. Shield Item 3. Sword Item 4. Armor with some help, i was able to figute that …

Member Avatar for MJFiggs
0
116
Member Avatar for chunalt787

I am trying to pass the size of the matrix array during the constructor but its giving me the following error. Is there a different way to do this? [CODE]In file included from Main.cpp:1: AdjacencyMatrix.h: In constructor ‘AdjacencyMatrix::AdjacencyMatrix(int, std::string)’: AdjacencyMatrix.h:13: error: ‘numberOfNodes’ cannot appear in a constant-expression [/CODE] Line 13 …

Member Avatar for chunalt787
0
202
Member Avatar for egolovin

I am looking for a command where i can press m and it pulls up my menu function. i feel retarded cause i tried to look it up but i dont know what i should look for exactly i know qbasic has a inkey command but i cant figure it …

Member Avatar for ArkM
0
133
Member Avatar for Photomotoz

Hey, guys I think this is a very simple problem and that I just can't get it is due to some gap in my knowledge. Any way, what is wrong with this : [CODE] class A{ private: int value; public : A(int v); }; A::A(int v) {value = v;} //Does …

Member Avatar for StuXYZ
0
96
Member Avatar for kevintse

[code=cplusplus]#include <iostream> using namespace std; #define PRINT(x) cout << #x " = " << x << endl; class Object{ public: Object():i(5){} int i;; }; int main() { Object o; o.i = 5; int* p = &(o.i); PRINT(*p); int Object::* p2m = &Object::i; PRINT(o.*p2m); return 0; }[/code] the two PRINT macros …

Member Avatar for ArkM
0
124
Member Avatar for CPPRULZ

I've been studying enums lately and decided to make a program with it to test the enum syntax and my first one worked. It was: [code=c++] #include<iostream> using namespace std; int main() { enum daysinweek{ monday=0, tuesday=1, }; enum daysinweek enumerator=monday; cout<<enumerator<<endl; system("pause"); return 0; } [/code] It worked perfectly, …

Member Avatar for StuXYZ
0
142
Member Avatar for Fouly

Hi all, I'm a beginner at Open Watcom and i'm trying to R/W from and into a file...i used the library "fstream.h" but the scanner shows invalid token... [code] #include <stdio.h> #include <string.h> #include <iostream.h> #include <fstream.h> int main() { ifstream inFile; // object for reading from a file ofstream …

Member Avatar for cikara21
0
182
Member Avatar for Tex_Waco_USMC

I am a fairly new programmer with limited knowledge in C++. I am currently writing a program for my class that involves fractions. I was doing good writing one piece at a time and making it work until the instructor threw a wrench into my plans and asked me to …

Member Avatar for vmanes
0
84
Member Avatar for Se7Olutionyg

[CODE] // Description: This is a computer version of the game hangman, the user // can play against a 2nd player or the computer, and he can enter how many // guesses he gets, // // Start of program // Header file definitions #include <iostream> // Standard input/output #include <string> …

Member Avatar for Salem
0
127
Member Avatar for DemonGal711

Ok, working on a program to find the shortest path between two points. Simple. Now, we are going to be given a list like this to denote the start and end, and then the weight of the lines. [code]A D B C 31 B A 4 C A 12 C …

Member Avatar for DemonGal711
0
144
Member Avatar for vickzbrit

How do I disable and Enable Menu Items and Sub Items. [code]if(Selected == "drum" || Selected == "guitar" || Selected == "mic" || Selected == "computer" || Selected == "car" || Selected == "hockey" || Selected == "laptop" || Selected == "watch" ) { pCmdUI->Enable(Sort == 1); }[/code] The above …

Member Avatar for vickzbrit
0
1K
Member Avatar for drjay1627

I encode a text file using a huffman tree. Which print out to the screen and and output to a file. File only contains the last line that prints to the console. [code]void traverse(string code = "") const { string outputFile = "huffman.txt"; ofstream outfile(outputFile.c_str()); if (child0 !=NULL) { static_cast<huffman_item<dtype> …

Member Avatar for skatamatic
0
177
Member Avatar for ajorge

Hi to all! I never used Pointer Functions, and now i'm trying to use a C Pointer Function in Visual Studio 2005. But there's a problem... the pointer function isn't working properly... This kind of functions doesn't work in the same way in C and in C++? My pointer function …

Member Avatar for ArkM
0
108
Member Avatar for elsa87

hi everyone.. i have a small problem with the below code.. when i execute the program, the output file doesnt print me the unsortedList.ReturnLastItem().Print(); it gives me the following output: the last item in the unsortedList is how can i make it print me the last item? here is the …

Member Avatar for cikara21
0
206
Member Avatar for daviddoria

I want to do something like this: unsigned char r[3] = {255, 0, 0}; map<unsigned char[3], int> ColorList; ColorList[r] = 1; But I get the following: error: array used as initializer How else would I set the r element of the map? Thanks, Dave

Member Avatar for daviddoria
0
2K
Member Avatar for cout<<"alias"

Hi there, been having some trouble with a simple program i am trying to write. I'm fairly new to C++, and can't seem to fix the errors im getting. Any ideas or hints would be much appreciated. [code=c++]#include <iostream> using namespace std; int main() { double payrate; double hours; double …

Member Avatar for cout<<"alias"
0
145

The End.