49,761 Topics

Member Avatar for
Member Avatar for ipcmd0

Hello, hopefully someone would be able to help me with this project I am working on. I have two classes now RationalNumber and Term. The RationalNumber class works fine when I invoke it directly to create a fraction. The Term class was created to leverage the RationalNumber class to create …

Member Avatar for daviddoria
0
197
Member Avatar for Hey11

hello i wanna enter a function that contains various data types to be displayed in a linked list , but the problem that the program can't convert from int to void , and of course i can't make an int function for a string or char here is my function …

Member Avatar for daviddoria
0
79
Member Avatar for andimiami

Ok, so I have to write this program that reads #'s into an array, such as grades... The program must have: * Read and Print the Numeric Grades * Declare an array of characters to store the character grades associated w/ the numeric grades * Translate the numeric grades into …

Member Avatar for andimiami
0
150
Member Avatar for tdba.316

Hey :D this is my first post here^^, and it's a problem with an exercise from the book C++ Primer Plus, which I have been self-studying (I'm the beginner). The following code is how I did the exercise, which is in the header comment. It was built in VC++ 2010, …

Member Avatar for tdba.316
1
1K
Member Avatar for tech9x

for example my array is test[10], and i want to clear 2 of the 10 memory, how to do that??

Member Avatar for tech9x
0
228
Member Avatar for halopower67

Hey guys, so i have this project due on the 13th of Dec. I have been trying to work on it but im at a roadblock pretty early on and im just at a loss as to what to do, so i would appreciate a ton if you guys an …

Member Avatar for SgtMe
-1
125
Member Avatar for mekhan8

Hello Everyone, Just started my intro to C++ class and was given a code to complete to help prepare me for further classes. What I need to do it create a grid using arrays like this (which I completed): 000 010 000 and then somehow move the "1" to other …

Member Avatar for SgtMe
0
137
Member Avatar for Lasbunter

I need example Bank system with C++ programming :icon_smile: Please share here what you know about that ,, :)

Member Avatar for Perry31
-4
142
Member Avatar for badllama

Otay, I was brushing up my coding skills by creating a basic, coding 101 list class. At this point it works fine with a generic value, either primitive type or class. If it's a class, all the relational operators need to be overloaded to match the class key. I suddenly …

Member Avatar for badllama
0
139
Member Avatar for pandaEater

I'm making a heap class and I want one of my functions, [I]const Employee& Heap::top() const[/I], to return a reference to the top element or throw an error if the heap is empty. I've never used try, catch, or throw statements before so I'm having trouble getting it to work …

Member Avatar for pandaEater
0
134
Member Avatar for newbee3

Hello, I need to write a password check function to validate the following: 1. Length of the string is at least 5 characters. 1. Cannot be all digits. 1. Cannot contain a space. Below is some of what I have so far but I'm not sure if it is correct. …

Member Avatar for Isaac Remuant
0
125
Member Avatar for chamnab

hi does everyone know how to delete ' ->' in visual c++ ? Ex. #include<iostream> -> int main() -> ->{std::cout<<"Hello"; -> ->. return 0; ->-> }

Member Avatar for Ancient Dragon
0
94
Member Avatar for lauruskamj

I have to write a C++ program that inputs a file containing three arrays which need to be added together. The file needs to have its dimensions on the first line and then the three matrices following it. I can't seem to get off the ground with this. I know …

Member Avatar for Ancient Dragon
0
96
Member Avatar for hero0765

hi: I have a trouble on the codes below, if I were to insert string n into the following string "Constructing student" ,the compile would appear error C2679. I don't know where any error the code have. error C2679: binary '<<' : no operator defined which takes a right-hand operand …

Member Avatar for Ancient Dragon
0
179
Member Avatar for jnewing

Hey all sorry I'm new to c++ and just trying to get my head around vectors of objects etc.. so here is what I'm playing with [CODE] #include <iostream> #include <string> #include <vector> using namespace std; class foo { public: std::string blah; std::string blah1; foo() { } foo(std::string b, std::string …

Member Avatar for Ancient Dragon
0
169
Member Avatar for nickcolb

The output portion of the do/while loop below (i.e. MENU) outputs twice once youve selected your choice, and I have no idea why its doing this. [CODE] #include<iostream> using namespace std; struct StudentRecord { int stuId; char name[20]; char grade[4]; }; void showOneRecord(StudentRecord);//display a student record void showRecords(StudentRecord[],int);//display all student …

Member Avatar for Clinton Portis
0
93
Member Avatar for Spartan_MSU12

Hey all, this probably is a simple fix and i just don't see it. I am having trouble printing out a code. I am supposed to print a list of User-names passwords and Pin numbers in visual C++ console, but when i run the program my pin numbers seem to …

Member Avatar for jonsca
0
179
Member Avatar for kshaaban

Hi everyone, i was wondering how it might be possible to send variables from a programme written in c++ to be used in a separate application which is coded in python. I am using opencv to calculate points of interest in c++. I would then like these resulting co ordinates …

Member Avatar for kshaaban
0
306
Member Avatar for ace8957

Hi all, I've been working on making a bounded priority queue implemented as an array of queues and I believe I have it at last -- except of course for this error that I don't understand... I am getting an error about the queue array being declared without a type …

Member Avatar for ace8957
0
411
Member Avatar for schoolboy2010

Hi My program is supposed to implement a binary tree with an insert, remove, copy, pre-order, post-order and in-order views. Problem is that my code compiles... but doesnt work. Could someone help me out. Thanks. I attached the code... [ATTACH]18222[/ATTACH] [ATTACH]18223[/ATTACH] [ATTACH]18224[/ATTACH]

Member Avatar for schoolboy2010
-1
241
Member Avatar for schoolboy2010

Hi, My program is supposed to implement a binary tree with an insert, remove, copy, pre-order, post-order and in-order functions. Problem is that my code compiles but doesn't work correctly. When I try to insert more than one node/child node the program crashes/freezes. Could someone help me out. Thanks. header …

0
197
Member Avatar for donmiq

Hello, I have an assignment to copy contents of a file (txt), and output it in the destination file which is also a text file. While (or after?) that is done, it needs to output the average of each line, which does not have a constant amount of numbers per …

0
43
Member Avatar for tech9x

[code=c++] int main() { Appointment appt; int i; string *description; int *day, *month, *hour, *min, *_hour, *_min; char chr, chr1, chr2, chr3; string *command; command = new string [sizeOfArray]; int sizeOfArray; cin >> sizeOfArray; for(i= 0; i< sizeOfArray; i++){ cin >> command[i]; if (command[i] == "cancel"){ // <---- ERROR OCCURS …

Member Avatar for mike_2000_17
0
132
Member Avatar for SVSU_Student

I am getting zero, the lowest test score is 10 not zero. I created my own test file with only 10 scores to be able to test my program. I am certain min should equal 10. Here is how I read the data into the array after being sure the …

Member Avatar for Fbody
0
142
Member Avatar for -ordi-

Input: A, B, C, D, E ... [CODE] 1/1 1/2 2/3 3/4 2/5 [/CODE] Output (Queue!): [CODE] 5 B 1 E 3 C 4 D 2 A [/CODE] How to make this? Mark competitors (persons) Example: A ... E their come in first queue. A can label/tag 1/1. B can …

Member Avatar for -ordi-
0
139
Member Avatar for hq1

Hi so I have this assignment for one of my classes, im having some issues with it. I was hoping someone could have a look at it and tell me what i am doing wrong and what I need to fix. Thanks! heres what the assignment is: The High Fashion …

Member Avatar for hq1
0
283
Member Avatar for sallubhai

Hi, I want to draw some rectangles with the same size and different colors by using an array but donĀ“t know exactly how to do it in the for-loop. [CODE]class Figure { private: int **figur; int row,col; public: Figure() : row(5), col(20){ } void allocate_place(int r, int c) { this->figur …

0
102
Member Avatar for tegaelam

Ok so my assignment is as follows: Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: **void getScore()** should ask the user for a test score, store it in a refrence …

Member Avatar for daviddoria
0
108
Member Avatar for localp

I need to add MYSQL to Visual studio 2008, and run a simple SQL may be an insert to verify everything is working. so this is what i did. i got this part from a forum>> [QUOTE]go to control panel>administrative tools>odbc datasource then on user dsn click add select Mysql …

Member Avatar for Isaac Remuant
0
406
Member Avatar for KLane

I am trying to write a program that reads an external file and does a few statistics but it does not return the correct values for the mean and standard deviation. Can someone help point point out what I did wrong?? Below is my codes:- #include <cstdlib> #include <iostream> #include …

Member Avatar for SgtMe
0
127

The End.