49,761 Topics

Member Avatar for
Member Avatar for mertucci

function is x/y+z means (x/y)+z if you dont write to Z anything program says "ERROR: Operator-operand imbalance." program is that as it is above and my code is [ICODE]#include <iostream> using namespace std; class Calculator { int x,y,z; public: void arith_ex(int,int,int); }; void Calculator::arith_ex(int x,int y,int z) { cout<<"X="<<endl; cin>>x; …

Member Avatar for mertucci
0
122
Member Avatar for 26933

Hi,everybody I am a beginner in c++;Could you please tell me how to change an iteration program to a recursive one and vice versa?It will be greatly appreciated if you could show me with the help of a few examples(programs).

Member Avatar for Salem
0
154
Member Avatar for SpecialeW

Hi everyone, I'm having some trouble with my computer lately. When my computer boots, i want a lot of programs to load, half of them normally makes a tray icon, but my computer is so slow, the tray icons won't be created. So I've found a way to work around …

Member Avatar for Salem
0
158
Member Avatar for R4zrF1r3

[CODE=c++] #include <iostream> using namespace std; //----------------------------------------------------------------------------- void UserMove(int &NumStones) /* Pre: NumStones > 0 Post: User has taken 1, 2, or 3 stones from pile */ { cout << "How many would you like? "; int TakeStones; cin >> TakeStones; while (TakeStones<1 || TakeStones>3 || TakeStones>NumStones) { cout << …

Member Avatar for VernonDozier
0
116
Member Avatar for toolbox03

Just wondering how do you create a queue system using pthread? I need to create 2 thread, one for putting in the queue number into an array and the other for removing the queue number from the array.

0
58
Member Avatar for som3on3

can anyone help me convert this to c++?? <?php function show_me($info) { $arr = array('fruit' => 'apple', 'car' => 'bmw'); return $arr[$info]; } echo show_me('fruit'); //or echo show_me('car') ?>

Member Avatar for som3on3
0
113
Member Avatar for Traicey

I have seen so many classes and inheritance programs but what I cant seem to know is when and why do u end up resorting in this statement [ICODE]#include "NameOfTheClass_h.h"[/ICODE] and I guessed that is when u have separated the class from class main(), that sounds like making your program …

Member Avatar for Traicey
0
124
Member Avatar for CE Student

Hi!!! How Are you I bring a new program which I have solve it ; but there are 7 error without explain please I hope that I have any body to help me and I will be happy thhhhhanks alot :) This is the question Consider the following class definition: …

Member Avatar for Radical Edward
0
174
Member Avatar for soka2oo7

:'( :icon_cry: i'm trying to make a snake game & i can't make the lenght of the snake increase & it's score & the fruit appears one time only & i have to press on the arrow all the time please help me in this code today please. i've thought …

0
57
Member Avatar for Gerlan

Okay I have a small problem. I have to load a file which contains (for example): a bleh b blah c bloh So basically it contains a character(1,2,3,..etc) followed by a string (bleh,blah,bloh etc..) I have to create a struct which should contain a char and a string, they will …

Member Avatar for Abzero
0
95
Member Avatar for picass0

i trying to input the text from a text file into a byte buff[]. When i did this byte buf1[] = word; it will prompt me with "initializer fails to determine size of `buf1' " and invalid initializer error. How am i able to pass in the text of my …

Member Avatar for vijayan121
0
144
Member Avatar for martonx

Hi Everyone, I have a C++ program lesson, but i can't to do it. I have a binary file with structured datas. I have to read the datas, and take into a class (structure array). Here is my code: [CODE]#include <iostream> #include <fstream> using namespace std; struct dolgozo { char …

Member Avatar for martonx
0
101
Member Avatar for mertucci

Question is: "Implement a Person class that includes data members to represent name, address, and identification number. The class interface includes methods that provide appropriate access to the data members. Derive a CollegeStudent class and a Professor class from Person. Each of these derived classes should add appropriate data members …

Member Avatar for mertucci
0
178
Member Avatar for bhoot_jb

hey friends i am working with a program of "stack of stack".....and i thought to work it out using inheritance....but i m stuck in it... i thought to inherit both the stack - the parent stack and a stack element....from a single base class.. i mean i am in dilemma …

Member Avatar for bhoot_jb
0
150
Member Avatar for midimatt

Just been looking over Dynamic Memory Allocation, using new. Heres a snippet of the code i've got. [code=c++] vertices = new float *[v]; for (i = 0; i < v; ++i) { vertices[i] = new float[3]; } [/code] what i was thinking was could i just do [code=c++] vertices = …

Member Avatar for bugmenot
0
126
Member Avatar for n.aggel

hi to everyone, In this semester we are having a class concerning High Performace computing / Parallel processing... In short i have the following questions: --- We are using pthreads and C. I think that i can use pthreads in c++ code but is there any way to use threads …

Member Avatar for n.aggel
0
168
Member Avatar for joshmo

Am trying to extract a string of characters and numbers from a text file into two different data types in a linked list...i.e the if the text file has the data myname 100 i want the "myname" to be stored as a string and then the 100 as an integer..can …

Member Avatar for joshmo
0
3K
Member Avatar for RenjithVR

Hi , I am using openRTSP test program. In the make file i used debugg option. But when i tried to debugg for example : "b 320", i got the following error. No line 24 in file "init.c". I don't know about this error. But gdb is working fine. For …

Member Avatar for RenjithVR
0
131
Member Avatar for neilconnexios

I'm a beginer in C++, and I've read number of posts regarding reading CSV files but have not understood how to convert them in to an array my file reads just numbers that are seperated by tabs 23 34 67 78 45 56 89 90 23 45 79 23 33 …

Member Avatar for Nick Evan
0
324
Member Avatar for Cosa

Hi, i have a function which is supposed to compare two matrices, however i does not work properly. I get this compile warning. [code] warning: control reaches end of non-void function [/code] Here is the function. [code=c++] bool matrix::isequal(const matrix& ob3) { for (int i = 0; i < rows; …

Member Avatar for Nick Evan
0
140
Member Avatar for yazooney

Hi, I'm not sure if this is the right thread, but here goes. I have a program installed which shows the live price of a product i am interested in (i.e. the price changes every couple of seconds). Now I cant access the programs source code to get the price …

Member Avatar for Salem
0
136
Member Avatar for kux

hello, I have the following problem I have an unsigned long variable, but it is designed to hold values within 0 .. 100 ( I know an unsigned char would have been enough, but i have to use an unsigned long ). I have to write that value in a …

Member Avatar for Salem
0
193
Member Avatar for flash121

Hello I have an abstract class called Number and a simple derived class called Double, which has a private variable value and a function called getValue() which returns the value; I also have a vector of pointers of type Number which are pointing to Double. code: [code=c++] ... vector<Number*> v1; …

Member Avatar for bugmenot
0
135
Member Avatar for mertucci

Question is: "Write a complete program that writes into a file from an array of string and also in reverse order." Please help

Member Avatar for joshmo
0
92
Member Avatar for Cafetero

I am trying to write a program that takes email addresses out of a text file (for easy copy paste) but when it finds one and prints it to the console it skips to the next line. So if there are two email addresses in one line it will only …

Member Avatar for Duoas
0
155
Member Avatar for Maulth

I've posted something along these lines before, but it's a tad bit different this time, hopefully some of you can point me in the right direction. I'm designing a tool that will make adding things to a database easy for people not familiar with SQL, it will basically export a …

Member Avatar for Maulth
0
170
Member Avatar for marti3a3

So I'm trying to create 4 arrays with data input from a .dat file, and for some reason it won't. The file has four columns, and I want four arrays with the info from each column seperate. For some reason, I'm having trouble doing that with the following code (minus …

Member Avatar for marti3a3
0
83
Member Avatar for aastephen

//person class class Person { //private: public: char name[30]; char type[20]; char date[10]; char id[10]; Person(char pname[],char ptype[],char pdate[],char pid[]); void addPerson(); void personDelete(); char personFind(char pid[]); }; //this function find with id and return the name of the person char Person::personFind(char pid[]) { fstream readFile; readFile.open("employee.txt",ios::in); if(readFile.fail()) { cout<<"Cannot …

Member Avatar for n1337
0
116
Member Avatar for bhargsy

Hello All, I new to this forum and C++. Searched a lot on the web, but could not find help anywhere. I have two directories under each of which, I have multiple .cpp files. Each of the directories have a one .h include file that contains function declrations for all …

Member Avatar for bhargsy
0
82
Member Avatar for Jennifer84

I have a problem with sorting a vector in a specific order. As seen below I am putting 4 strings into a vector like this. The result of the sorting that I am after is like this: (Highest Value at the top and the Lowest Value at the Bottom) [B]20A …

Member Avatar for Duoas
0
147

The End.