49,757 Topics

Member Avatar for
Member Avatar for Sudhanshu_1
Member Avatar for glamiex

How do I change this code so that the user can choose a math operation and determine have that type of operation(either add sub mult or divide) run as much as a user wants it to? Say, if the user wanted 5 addition questions only. And how do I keep …

Member Avatar for David W
0
156
Member Avatar for janith.amarawickrama

I created following classes in my program. Way.h class Way { private: std::string id; std::string name; public: Way(); Way(const Way& orig); void SetName(std::string name) { this->name = name; } std::string const & GetName() const { return name; } void SetId(std::string id) { this->id = id; } std::string const & GetId() …

Member Avatar for rubberman
0
173
Member Avatar for cazmere
Member Avatar for shizu

Hi all.. I have a image taken by vision machine camera.. Object is arrange by different layers.. I able to get accurate object position for those drop in calibration layer.. For layers that before and after calibration layer,position is not accurate.. Working distance is fix.. Can u all provide me …

0
79
Member Avatar for LucyLogic

I need some assistance with a program I wrote and had to alter. Here are the initial instructions and what I initially had then my reworking and what I have now and any assistance would be helpful. Write a C++ program to help you balance your checkbook at the end …

Member Avatar for David W
0
3K
Member Avatar for dan.doca

so i got a class going for making and showing tree elements, i need some help with the following: i need to display the leaves and the height of the tree. here is the code: // ar.cpp #include <iostream> #include <stdlib.h> using namespace std; class nod { public: char inf; …

Member Avatar for dan.doca
0
368
Member Avatar for Emma_3

I'm trying to convert a number from any base between 2-36 to any base between 2-36. I have the conversion to base 10, but I'm having trouble getting it from base 10 to the desired base. Any ideas? I know part of this idea will work, I just can't get …

Member Avatar for David W
0
515
Member Avatar for mystycs

I am trying to print my queue which has values in it. Right now i have this. for(int i = 1; i<ReadyQueue.size(); i++) { } But i am stuck now because i have no idea how to print a queue without popping it off the front. So now i am …

Member Avatar for David W
0
1K
Member Avatar for mystycs

I have a class below class CPU { public: void setPID (int a) { PID = a; } int retrievePID() { return PID; } private: int PID; }; And i am curious if you can create a queue into this class? I am trying to queue in a value into …

Member Avatar for David W
0
408
Member Avatar for chubbyy.putto

Here is question: Write a program that reads a string from the user containing a date in the form mm/dd/yyyy. It should print the date in the form March 12, 2012. #include<iostream> using namespace std; int main() { int mon; int day; int year; string month[] = { "January", "February", …

Member Avatar for David W
0
1K
Member Avatar for memona.ali.5836

Write a program to get 3 numbers from user for integer variable a, b,and c. if a is not zero, find out whether it is the common divisor of b and c.

Member Avatar for David W
0
202
Member Avatar for mystycs

How can i write it so that my program only accepts positive integers that are great than or = 0? I want my program to ask "How many devices do you wish to add?" And if a user enters a letter, or anything negative it will ask them to enter …

Member Avatar for David W
0
19K
Member Avatar for Tsaou

I keep getting loads of linker errors that probably have something to do with virtual-functions/definitions and/or static class members... I've seen several relevant posts but none of the solutions suggested work, can you see wht the problem is here? My projects consists of 3 files: BALLS.H #include <iostream> using namespace …

Member Avatar for Ancient Dragon
0
506
Member Avatar for mystycs

I am getting an error on this code. Is it to do with whats in the while loop? How do i get it working? Basically i want to be able to take in letter or number variables, and each would output something, and if they type exit it breaks out …

Member Avatar for David W
0
515
Member Avatar for mystycs

How can i create a input that only allows the letters a b c d The console will ask to please enter a letter. And they can only enter the letters a b c d. And if they enter it, it says thank you for enter a, or b or …

Member Avatar for David W
0
311
Member Avatar for john.kane.100483

Ok this program is almost done. Some correction are still needed. Can anyone here put this in character array. #include<iostream.h> #include<conio.h> #include<stdio.h> char value; char t, u, v; char answer; void Binary2Decimal() { gotoxy(1,9);printf("[BINARY TO DECIMAL CONVERSION]"); char b2,f2=1,d2=0; gotoxy(1,11);printf("Enter a Binary number: "); scanf("%d", &b2); printf("\n\n"); while(b2>0) { if((b2%10)==1) …

Member Avatar for David W
0
1K
Member Avatar for shaneetra.graham

cd just stays at this state: sgraham@myshell:/home/class/sgraham>cd .. sgraham@myshell:/home/class/sgraham>cd .. typedef struct { int argument; // userCom arguments char *arg[MAX_ARGS + 1]; // userCom arguments array char *Listcomm[MAX_COMMAND_SIZE]; char *input; // hold input file char *output; // hold output file } Command; int main() { Command userCom; //holds userCom struct …

Member Avatar for JasonHippy
0
219
Member Avatar for thewalrus

The only time I know of is when we call the assignment operator. Is there any other moments I should do it? Like any other operator where memory management would be useful?

Member Avatar for panqnik
0
65
Member Avatar for thewalrus

public: Queue() : front(0), back(0) {} void put(TreeNode *ptn) { ListNode *tmp = new ListNode(ptn, 0); if (back == 0) front = tmp; else back->next = tmp; back = tmp; } TreeNode *get() { assert(front); TreeNode *result = front->ptn; ListNode *tmp = front->next; delete front; front = tmp; if (front …

Member Avatar for thewalrus
0
207
Member Avatar for CHETNA_1

i have declared two functions of void type.lets one function calculates value of variable 'c' and other of variable 'y' and when i cout them it comes out to be correct within the function.now i want to declare another function that compares values of 'c' and 'y' and return 1 …

Member Avatar for panqnik
0
160
Member Avatar for aronno.amin
Member Avatar for Vasthor

My friend and I tried to create a team of programmers for doing bunch of work, our main aim is the gaming sector (probably). It was said around the net that it was hard work. So, we decided to plan it from now. I got around 1-3 years(blurry because I'm …

Member Avatar for deceptikon
0
251
Member Avatar for shaneetra.graham

hello i'm trying to make this into a switch statment but i'm having trouble. Any help would be great!!! this is for a shell commands in C. if(strcmp(command->comm[0], "exit") ==0) //exit { printf("EXITING.....\n"); break; } else if(strcmp(command->comm[0],"history")==0) //history { int i=1; for(;i<hisSize;i++) printf(" %s ",history[i]); } //history end else if(strcmp(command->comm[0],"echo")==0) …

Member Avatar for shaneetra.graham
0
117
Member Avatar for rock9449

I need help in writing a C++ program that converts 24-hour notation to 12-hour notation. (For example, it should convert 14:25 to 2:25 P.M. The input is given as two integers. There are three functions: one for input, one to do the conversion, and one for output. Record the A.M./P.M. …

Member Avatar for deceptikon
0
8K
Member Avatar for uonsin

Hi everyone and thanks in advance for the help. I have the following class that throws an error on compiling where i declase a vector of pointers I have an Engine class that I want to host multiple scenes objects stored in the vector sceneList and then pass which ever …

Member Avatar for uonsin
0
342
Member Avatar for Sara Masri

Write A program that reads a statement of c++ langauge and prints a table of tokens and classes (keyword, identifier

Member Avatar for Ancient Dragon
0
189
Member Avatar for Rashmi_1

Hi, I need some help with starting a program. Kind of lost on how to begin it, any guide to start it would be helpful. Here is the link of the program: http://home.earthlink.net/~craie/122/labs/strfind.html I need to do all the different levels for this program. Thanks

Member Avatar for David W
0
383
Member Avatar for (Z!Z!)

I have to take two arrays, put them in a function, and then put them into a file. I have no problem actually making the arrays, but I am not quite sure how to go about defining the function for both arrays. I appreciate any help! #include "stdafx.h" #include<iostream> #include<fstream> …

Member Avatar for (Z!Z!)
0
200
Member Avatar for buixuanhai

After I enter first name then program fail. Error: RUN FAILED (exit value 1, total time: 2s). I use Netbeans #include <iostream> using namespace std; struct Student { char * firstName; char * lastName; char * telephone; }; void printStudent(Student s) { cout << "Student info: " << endl; cout …

Member Avatar for David W
0
710

The End.