49,755 Topics

Member Avatar for
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
126
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
245
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 mvmalderen
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 mvmalderen
0
121
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 mvmalderen
0
717
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
198
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
98
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
85
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
610
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
160
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
562
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
392
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
163
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
219
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
99
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
Member Avatar for Moe

Hello! I am writing a program to overload ~ operator to reverse the given string. Here is my program. The problem message is that"Could not find a match for string::string(char). I am writing my program on linux. I can not use strrev function. [code] #include<iostream.h> #include<string.h> class String { char …

Member Avatar for Lerner
0
239
Member Avatar for hurbano

I have an assingment in which i have to right an algorithim to get through a maze. I dont know where to really start with it. I know in the instructions it said to write it as though we used our right hand as a guide. in other words we …

Member Avatar for hurbano
0
108
Member Avatar for emiller7

The following program accepts five student names and 4 test scores for each. Then calculates and displays the average and letter grade for each students. Well, that is what it is supposed to do. Judging by the long list of errors I get, it looks like none of my arguments …

Member Avatar for VernonDozier
0
6K
Member Avatar for blackbyron

Hello, I am writing a program about gas pump. Here is my code [ICODE]class GasPump{ public: GasPump();// loads all pumps w/ 50 gallons, price is 2.00, 2.25, 2.50 GasPump(int l, int m = 100, int h = 100); //price is 2.00, 2.25, 2.50 GasPump(double pl, double pm, double ph); // …

Member Avatar for blackbyron
0
104
Member Avatar for erin0201

Here is my code including header files. My program is supposed to be a fraction calculator that handles exceptions such as division by zero, division by non-integer values, allows user to re-enter any values the program threw an exception for, and allows the user to continue to use the program …

Member Avatar for erin0201
0
133
Member Avatar for perumar

The type Point is a fairly simple data type that represents a point in the two-dimensional plane. Write a definition of a class named Point that might be used to store and manipulate the location of a point in the plane. You will need to declare and implement the following …

Member Avatar for mvmalderen
0
259
Member Avatar for Thew

Hello, is there any way how to listen to communication on COM ports? Not to open them for using, deny any application from access to it, just to watch the data comming in and out the COM port.

0
37

The End.