49,761 Topics

Member Avatar for
Member Avatar for homeryansta

csci>g++ -c queue.cpp csci>g++ queue.o project6.cpp Undefined first referenced symbol in file Queue<int>::return_index() /var/tmp//ccHbZwrM.o Queue<int>::enqueue(int) /var/tmp//ccHbZwrM.o Queue<int>::dequeue() /var/tmp//ccHbZwrM.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status These are my errors. As you can see, my implementation file compiles, but does not compile …

Member Avatar for homeryansta
0
128
Member Avatar for shamila08

Hello..... i got a problem where my output are repeated..... how to solve this problem.... [code=cplusplus] #include <stdio.h> #include <stdlib.h> #include <iostream> #define MAX 100 int num[MAX]; int n; int nrows = 0; int temp =2; using namespace std; void print() { if (num != 0) { for (int i …

Member Avatar for WaltP
0
83
Member Avatar for CPPRULZ

I have recently learned about virtual functions and it is to my understanding that they are a keyword that goes in front of the return type when defining a function. They go in a base class, and make it so that if a member function of the base class is …

Member Avatar for nucleon
0
107
Member Avatar for cruisx

Hi, i was wondering if it is possible to launch a .exe file using c++? say i want to write a simple program which will ask the user if the would like to install the following.:(i am just making it up) Please pick the number beside the program to launch …

Member Avatar for nucleon
0
15K
Member Avatar for jimjohnson123

I am testing a program that I am trying to run and having some difficulties with it. If you run this program I am able to compille it fine but will not return anything and stalls on me...Here are the instructions..... There are 25 digits split into five groups of …

Member Avatar for WaltP
0
1K
Member Avatar for shea279

ok so i have some code that works perfectly with visual studio 2003, but when i move it into my project which is using visual studio 2008, the compiler spits out 9 errors. compiler output: [CODE]1>Compiling... 1>main.cpp 1>.\main.cpp(3) : error C2011: '_STORAGE_QUERY_TYPE' : 'enum' type redefinition 1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winioctl.h(641) …

Member Avatar for greg022549
0
466
Member Avatar for IrishHenshin

Hi basically I've exhausted my mind looking for resources and help on the Huffman Tree Coding. This is my problem, there are 2 parts to what I have to do, the first done: 1. Given a text file, determine the frequency of each character in the text (map of character …

Member Avatar for monkey_king
-1
141
Member Avatar for shea279

ok, so i essentially have a .c file from anubis' process injection code, that i need converted to c++, which is the format of the rest of my product. on compiling, i am getting one annoying error error (when i compile as a .cpp file): [CODE]1>.\inject.cpp(27) : error C2440: '=' …

Member Avatar for shea279
0
257
Member Avatar for FREEZX

[CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> #include <math.h> #include <windows.h> using namespace std; int main() { int l, pos, pos1; unsigned long int currnum; string str0, str1; stringstream out; string::iterator x1, x2; float koren; bool find = 0; ifstream fin("koren.in"); ofstream fout("koren.out"); if(fin.is_open()) { fin>>l; fin>>str0; fin.close(); currnum=159; …

Member Avatar for FREEZX
0
150
Member Avatar for sid78669

ok. Heres the thing. I need to make cases for keydowns. I am catching the keycodes and them pass them on to switches. the un-understandable part for me is this: I have the same case for 'TAB' and 'DOWN' keys. Now, I was wondering if instead of repeating the same …

Member Avatar for Ancient Dragon
0
128
Member Avatar for Aristophanes

Hello, I just joined, so if I infringe upon any of the forum rules, then I apologize. Anyway, I have a code for approximating integrals via the Simpson's Method. The problem with the code is that somewhere within the mere 52 lines, I have divided my entire sum by 2. …

Member Avatar for Aristophanes
0
311
Member Avatar for evbaseball6

have to write a program to rotate the elements of an array a specified number of places input by the user, with these specifications: 1. A positive number indicates a rotation to the right 2. A negative number indicates a rotation to the left 3. Use only pointer notation (not …

Member Avatar for tux4life
0
72
Member Avatar for JameB

Can this program be shortened any further? I basicallly need to write a program that reads in two numbers and a char. eg. 10 + 10 then outputs its value.... The char can either be + or - or *. The number will always be less than 100. and you …

Member Avatar for nucleon
0
149
Member Avatar for gaspan

I have a problem about the code that skip the ID Number can you analyze the problem just enter 2 for adding and you can see the result

Member Avatar for tux4life
0
126
Member Avatar for Moe

hello! I like to define the Distance class and overload binary + operator to add the two distances using friend function. my program is here. But it does not work. The error message said that "undefined symbol feet". What is the problem? [code] #include<iostream.h> class Distance { int feet; float …

Member Avatar for Moe
0
114
Member Avatar for perumar

You operate several hot dog stands distributed throughout town. Define a class named HotDogStand that has a member variable for the hot dog stand's ID number and a member variable for how many hot dogs the stand has sold that day. Create a constructor that allows a user of the …

Member Avatar for tux4life
0
718
Member Avatar for badboizEnt

am a beginner in C++; am writing a program on C++ and i have bin trying to make a user enter his username and to enter a password and If correct the program will output a message such as: "Welcome Name of User” If incorrect my program should allow at …

Member Avatar for badboizEnt
0
208
Member Avatar for cipherbeale

Hello, I am a newbie to programing but I seem to be getting the hang of things. I am trying to create an plain text encription program that inputs the cipher key and encription text to be accepted via either comma deliminated txt or excel file. I have my program …

Member Avatar for shea279
0
105
Member Avatar for kahaj

Before the sum is given, the program closes. What's causing this? [code] #include <iostream> //function main int main() { //var declarations int number1; int number2; int sum; std::cout << "Enter first number: "; std::cin >> number1; //read first integer from user into number1 std::cout << "Enter second number: "; std::cin …

Member Avatar for PRATS 1990
0
99
Member Avatar for sara khan

this is a code to convert infix string to postfix...... but i am having some problems please help me:( #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<string.h> int presidence( ); void infixToPostfix(char *); template<class T> class Stack { private: T *data; int capacity; int top; public: Stack(); Stack(int ); T pop(); void push(T); int …

Member Avatar for nucleon
0
86
Member Avatar for dubbelodub

I'm stuck accessing a 2D map How do I retrieve data out of the inner map? [code]map <string, map <int, class> > myMap[/code] When I set up and iterator it, I get a std::pair. it->second should yield a pair aswell because it points to map <int, class> but I can't …

Member Avatar for nucleon
0
75
Member Avatar for rizrash

Hey friends i just want some help....well got a simple task this weekend to make a rings of different colors using circles....like i want an output in which a circle appear on top left and after little delay another one appear near to the first one...and so on......and all should …

Member Avatar for rsashwinkumar
0
617
Member Avatar for joejoe55

Can I use this function to read a percent Value from an ini? For example it would be something like this if (Life drops below X percent) (cDrinkaPotion) The code I have so far only reads key values and such, I dont know how to read a number value.. [CODE]bool …

Member Avatar for mitrmkar
0
1K
Member Avatar for msalman

hey, I've two classes and one class inherit the first class. I'm trying to add objects to vector (could be parent or child) and then call the overriding function (print) to display values passed in their respective constructors. But for some reasons only parent class' function (print) is invoked. I …

Member Avatar for msalman
0
163
Member Avatar for launic

I'm trying to recursively search through directories and pull out any files or subdirectories. This is the code I have: [code=cplusplus] int readDir(string directory, vector<string> &fileList) //directory is the name of a direcotry //fileList is an empty vector DIR *dir; struct dirent *ent; if((dir = opendir(director.c_str()) == NULL){ cout<<"Invalid Directory"<<endl; …

Member Avatar for zamp
0
568
Member Avatar for Ken JS

How do I find the Parity Check Matrix, when I’m given the generator matrix? e.g. | 1 0 0 1 1 | G = | 0 1 0 1 2 | | 0 0 1 1 3 | Can anybody teach me how to find the Parity Check Matrix or …

Member Avatar for SITI HARYANTI
0
396
Member Avatar for winrawr

I'm unsure of how declaring **x (a pointer to a pointer of x) is the same as declaring x[][] (a two-dimensional array of x's)... The theory I have is this: int *x = {whatever}; (x is a pointer to the first int value) *x (first array item, value pointed to …

Member Avatar for NicAx64
0
167
Member Avatar for Tejas

I got a question which i cannot do. Pls help me. (This is using Turbo C++ IDE). The questions are: Q1. WAP to print the sum of the following series: 2(square) + {2(square) + 4(square)} + {2(square) + 4(square) + 6(square)} .............. till N terms. Q2. WAP to find out …

Member Avatar for WaltP
1
230
Member Avatar for Takafoo

So having some trouble with the error checking in the below function. Currently if you enter something wrong like r it returns "Pleae Enter next move" which is correct. My problem is that if I enter rrr it will repeat "Please enter..." 3 times instead of just once. I hope …

Member Avatar for Takafoo
0
100
Member Avatar for JameB

I am trying to write a program that given two integers in two strings, substracts the second integer from the first integer and outputs it. 1. I read in two strings. 2. I reverse them (I am also adding them, I found it easier to add if they are reversed) …

Member Avatar for JameB
0
185

The End.