49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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, … | |
for example my array is test[10], and i want to clear 2 of the 10 memory, how to do that?? | |
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 … | |
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 … | |
I need example Bank system with C++ programming :icon_smile: Please share here what you know about that ,, :) | |
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 … | |
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 … | |
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. … | |
hi does everyone know how to delete ' ->' in visual c++ ? Ex. #include<iostream> -> int main() -> ->{std::cout<<"Hello"; -> ->. return 0; ->-> } | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.