49,757 Topics
| |
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 … | |
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 … | |
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) … | |
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); … | |
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] … | |
[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] … |
The End.