49,757 Topics

Member Avatar for
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
177
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
305
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
220
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
Member Avatar for whodoes21

Hello citizen of Daniweb may I ask a little help from you guys please :) see there's this program that our professor had asked us to make and It's about pointers. as a newbie to this world I was able to (gladly) make it but i feel like it could …

Member Avatar for whodoes21
0
195
Member Avatar for daviddoria

I have this: [code] int serialInt = 40000359; [/code] but what I really need is this: [code] int serialHex = (int)0x40000359; [/code] What can I do to turn serialInt into serialHex? I found some code that claimed to do this: [code] int IntToHex(int input) { std::stringstream ss; for (int i=2*sizeof(int) …

Member Avatar for daviddoria
0
166
Member Avatar for svatstika

Hello everyone! I'm trying to understand the following code: [CODE]class char_queue { protected: struct charNode { public: char val; charNode* next; charNode(char ch, charList* ptr) { val = ch; next = ptr; } }; protected: charNode* begin; charNode* end; void clearCharNode(); public: char_queue(); bool find(char ch); virtual void add(char ch); …

Member Avatar for svatstika
0
124
Member Avatar for Martje

hey guys, I am using windows textbox (CLR) and i was wondering how i would replace a newline to a text. I know how to replace words, i use : textBox1->Text->Replace("first","second")); but how would i replace a new line? lets say my textbox looks like this : [QUOTE] test1 test2[/QUOTE] …

Member Avatar for Ancient Dragon
0
102
Member Avatar for tech9x

[code=c++] int i; string *opening; string *ending; int *num1, *num2, *num3, *num4, *num5, *num6; char chr, chr1, chr2, chr3; for(i= 0; i< sizeOfArray; i++) { getline(cin,opening[i]); cin >> num1[i] >> chr >> num2[i] >> num3[i] >> chr1 >> num4[i] >> chr2 >> num5[i] >> chr3 >> num6[i]; getline(cin,ending[i]); } [/code] …

Member Avatar for jonsca
0
151

The End.