49,761 Topics

Member Avatar for
Member Avatar for RonaldvanMeer

I'm writing a program wich is using an array -> startpoint[4] this array will be later filled by values from an other array. this is not the problem! the problem begins here: I have a class: computerPlayer.cpp with a method: getStartpoint() [code=cpp] int *startPoint[4]; // global variable int* computerPlayer::getStartpoint(){ int …

Member Avatar for RonaldvanMeer
0
164
Member Avatar for christiangirl

Hello, I need to test an array of chars to see if they are numbers. I am trying isdigit() but that is not working. Does anyone know how I can do this? Here is the code, it is in three seperate files. I try to test the char in the …

Member Avatar for christiangirl
0
146
Member Avatar for Trekker182

I'm trying to make my first base class header file and an inherited class from it. I've compared the syntax with at least two other examples that we did in class and they match, yet I'm getting a lot of errors when I try to compile. This is the code …

Member Avatar for sidatra79
0
106
Member Avatar for NinjaLink

I am currently doing classes, but I am unable to print out my cout statements in the "elmo.modifyALL" function. I can get the other stuff to print correctly so far. This is my first time doing this kind of program, so I do not understand why I can't get cout …

Member Avatar for NinjaLink
0
119
Member Avatar for sistasweetpea

I have an assignment and I'm stuck. The program is supposed to read in names and test scores from a data file, compute the average, and display the letter grade. This is the code that the teacher gave us in class: [CODE=cplusplus] #include <iostream> #include <cstring> #include <iomanip> // // …

Member Avatar for sistasweetpea
0
115
Member Avatar for Avaviel

I'm having trouble with a program with class. When it runs, on the screen and on the file it shows one output, the last one in the input file. It USED to work, untill I tried to get fancy and add some other code... that will be below the main …

Member Avatar for Avaviel
0
338
Member Avatar for JustLearning

All this function is supposed to do is count each node in the queue and return the number of nodes. [code=c++] template<class SomeType> int TemplateQ<SomeType>::Size() const { int numberOfChars = 0; QueueNode<SomeType>* countPtr; if(IsEmpty) return 0; while(countPtr != rearPtr) { countPtr = frontPtr->data; numberOfChars ++; } } [/code] I am …

Member Avatar for Salem
0
164
Member Avatar for wussa

Hi, I am trying to finish this small project of mine but I can't seem to solve the problem for a few days already. Its about an simple application on messaging and reading message between 2 phones but when I am doing it it doesn't seems to be too simple.:p …

Member Avatar for William Hemsworth
0
70
Member Avatar for homero88

Hi, i need to compile 1 DLL, i start a new project, MFC appWizard(DLL),i select regular dll and push finish. i want to compile this: [code=cplusplus] /********************************************************************* ** XTrap Bypass ** ********************************************************************** ** Hacking Detected ** ** ---------------- ** ** 00435FA6 EB 35 All referenced text string, 'Hacking detected' ** …

Member Avatar for homero88
0
136
Member Avatar for cproud21

The following program is a game in which there is a pile of coins. When the loop runs two players take turns removing coins. Whoever gets the last coin wins the game. ... How can I get the looping to stop when there is a winner?? Right now it still …

Member Avatar for cproud21
-1
113
Member Avatar for akira_shinizaki

Hello everyone, i am new in this forum and also in C++ programming. I just started learning C++ few months ago from my university then i stuck from some assignment they give me yesterday. I need to count number's occurrences from input data. This is the assignment : Enter 20 …

Member Avatar for VernonDozier
0
92
Member Avatar for Code Shark

i cant get access to a pc atm im on my psp.. for(i = 0; i < 11; i++) { triangle(i, '×'); cout << triangle < endl; } triangle is a string. ty

Member Avatar for Salem
0
98
Member Avatar for Balinor

i wrote this up but seem to have done something wrong and honestly i cant seem to find it, it compiles just fine, but when i run i get stuck in an infinite loop. my WHILE doesnt seem to be working, i know its to do with the variable STAMINA …

Member Avatar for Denniz
0
86
Member Avatar for massivefermion

Hello Is it possible to Create a new character in C++? and then can we use it in in other softwars like word and such programs that you can write something in them? thanks a lot.

Member Avatar for Alex Edwards
0
132
Member Avatar for mrboolf

Hi all. I am trying to overload the operator+ for a SLinkedList class I created. I would like to write [ICODE]list1 = list1 + list2;[/ICODE] and obtaining that list2 is merged into list1. I thought it was simple but it didn't worked properly. I tried to simplify the problem as …

Member Avatar for mrboolf
0
263
Member Avatar for Se7Olutionyg

[CODE]#include <math.h> #include <iostream> using namespace std; void instruction(); int calculator (char); void divide_by_zero (); float do_next_op (char, float, float); int main() { //input char input; float accum,num; // instructions (); void intruction(); accum = 0 ; do { //get input cout<< " : " ; cin >> input; cin …

Member Avatar for sidatra79
0
103
Member Avatar for Kanvas

I've been trying to work it out for more than 10 hours already and still can get pass this The basic skeleton is like this [code] class BST { public: .... void insert (const device & aDevice); ..... private: ..... }; class device : public BST { ..... }; [/code] …

Member Avatar for sidatra79
0
191
Member Avatar for JustinJose12002

How can i grep a file using c++..? I have a file. File having a keyword. i want to get the count of that. i am tring to do int count ; count = system("grep -c keyword file1.txt"); cout << count ; /// this is giving me system command return …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for chanda gul

Hi all!! I am trying to save the subkeys and values of a key in a text file and i am not getting the result. the file created has not a recognizable name and there is nothing stored in it.. so please help me in this....thanx here is the code: …

Member Avatar for Ancient Dragon
0
96
Member Avatar for c230jif

This program is supposed to read 10 integers from an input file, save the largest and smallest integer to an outfile, and compute the even and odd integers and save the sums to an outfile. (The contents of the file named input.dat are: 45 23 12 8 -67 56 87 …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Kanvas

how do you make a node of pointer of a device? (device is just a class that i made up, i need to use pointers in LL so i can "share" one object with multiple LLs) [code] struct node { device * devicePtr; node * left, * right, * next; …

Member Avatar for kux
0
235
Member Avatar for jazzyangelz

I need help writing functions. In this program I need to be able to implement a number of useful functions using a header file and an implementation file. I also need to place the prototypes for my function in a .h file, and implement these functions in a .cpp file. …

Member Avatar for Denniz
0
143
Member Avatar for Headerandy

I am storing some data in a sting & I'm retriving it using stringstream but the problem is that it repeates last element two times.I could not understand why is this happning?Is there anyone who can help me on solving this problem? Programme code is as follows::::::::::::: [code=cplusplus] #include<iostream> #include<sstream> …

Member Avatar for Headerandy
0
150
Member Avatar for NinjaLink

I'm having problems in my "RemoveAt" function. I am trying to get a user to input a a position that represents a number they would like to remove from the array. Example below. For example: Current array.... 4,23,65,34,82,37,12,17,24,36,82,51 User input: [B]1[/B] (1 represents the position of what number will be …

Member Avatar for NinjaLink
0
129
Member Avatar for panpanf

Is there any open source c/c++ compilers what can be debugged easily? I wanna know more info about the common knowladge about c/c++ compilers.

Member Avatar for dmanw100
0
233
Member Avatar for robgeek

HI I was writing a program that passes a string into an array, reverses the string, and passes to another array. Half way done with my function definition I compiled and got some errors, that I am not able to understand. Here is my code: [code] // Hw-4_Bhasin.cpp : Defines …

Member Avatar for robgeek
0
133
Member Avatar for Se7Olutionyg

[CODE]//water # include <iostream> using namespace std; int main() { char code; int acc; float ammwater; float total; //get the data cout << " Insert acc number : "; cin >> acc; cout << " Type the code : " ; cin >> code; cout << " Ammount of water …

Member Avatar for VernonDozier
0
213
Member Avatar for clutchkiller

I have looked at a few tutorials that i could find online, but i still dont get exactly what they are used for and what the difference between going Blah[64] and Blah[8][8] is. Thanks

Member Avatar for chococrack
0
100
Member Avatar for Foe89

[code=cplusplus] #include <iostream> using namespace std; int main() { int num, greatest, least; char doAgain; do { cout << "This program lets you input a series of numbers and finds\nthe greatest and least values.\n"; cout << "Type in a value. -99 will finish the series.\n"; cin >> num; if (num …

Member Avatar for joshmo
0
97
Member Avatar for Vallnerik25

I have some simple syntax questions about constructing a vector from an array. I just read Narue's "C and C++ timesaving tips and tricks" sticky. And I have come across something that I have seen elsewhere that I didn't really understand, and that is the following code assigns integers from …

Member Avatar for Ancient Dragon
0
144

The End.