49,761 Topics
| |
Ok, so i changed the "/" to a '/' but i can't get my calculate decimal function for work. I want to call a private function calculateDecimalValue() that computes a floating decimal of the fraction inside the enterFractionValue() function after the num and den are filled. I'm not understanding how … | |
i was wondering if its possible to use visual studio C++ and have the programs work on linux? i just started C++ and want to clear some things up | |
I am looking for ideas for a program that I am trying to build. I need to have two pictures, one blurred and one clear. The blurred picture will cover the clear picture so it appears blurred. I need the mouse to appear as a sight glass so when the … | |
i before asked for help in my c++ problem and every one told me i have to do more effort so that might help me with it. please guys here is what i have reached and note that i dont have the visual studio 6 on my pc. i wrote … | |
I've created a class Fraction, and declared a private static character to hold the slash for displaying the fraction in fraction form later on. I can't seem to get the static char to compile and I need to figure out what I've done wrong, thank you for the help, jennie … | |
I am having a problem getting the execution screen to stay in order for me to view the program. Can someone tell me what is wrong with my program please? // /* A parking garage charges a $2.00 miniumum fee to pack for up to three hours. The garage charges … | |
Hello, I've managed to get linux installed on my box. Using fedora core 3 with a full installation........ Man all those games :eek: Anyway I'm left with a question I completed a working code in nedit and saved it has a cpp file. I open but a konsole find the … | |
hi all am having hard times since yesterday trying to solve this problem. Declare the following two integer lists: int a[] = {5, 8, 4, 1, 7}, b[] = {12, 3, 15, 6, 23, 1, 2}; int sizeA = sizeof(a)/sizeof(int), sizeB = sizeof(b)/sizeof(int); list<int> list1(a, a+sizeA), list2(b, b+sizeB); Use the … | |
I have a PvP TicTacToe program running, and everything is working fine, except for one thing: when a text character (q,w,e,etc) is entered the loop goes wild. Here's the portion of the code the loop is in, and if a text character is input instead of a digit, the loop … | |
I have to write a program to read N data items into two arrays, X and Y, of size 25. Calculate and store the products of corresponding pairs of elements of X and Y in a third array, Z, also of size 25. Also, compute and print the square root … | |
hi, i've got a bit of a roadbump in my work. I need to set all of the money values to have two decimal points on the end, but my current program only adds two places if there are more than one. right now, i am multiplying the value by … | |
I am now trying to add 2 strings together. But I dont understand where my compiler is pulling the reference to an int from. This is my code [code] #include <iostream> using namespace std; class String { char *str; //pointer to character block public: String(); //default constructor String (char *s); … | |
hi guys, i must right this program in c++ as 50% of my final grade and i have no clue how to do it because im a math major and im required to take this course is there anyone who can help me with this real quick pleaseeeee //* Write … | |
is this program i wrote so far going to store all the data entered by the user correctly?, i dont really understand structures completely yet. i think my cin statements need to store them differently to reference the structure. my code: #include <iostream> int main() { struct students { char … | |
Below is my source code, it won't compile and says that there is a Microsoft Run-Time error (1.#IND), can anyone help me out? Thanks! /*Program: hwassign3.cpp Author: Melissa Hubbard Date: January, 31, 2005 Purpose: This program was designed to take information from a user and perform the quadradic equation Ax^2+Bx+C=0 … | |
I'm having problems. I get the addition part. can somebody help. Here is the code i wrote so far. thanks, [code] #ifndef complex.h #define complex.h class complex { public: complex(); complex(double real, double imaginary); void complex addition(const complex &a); void complex printcomplex(); void complex setcomplexnumber(); private: double realpart, imaginarypart; }; … | |
I keep getting an error message when i try to run this program. It says he error is located at the cin >> fileName line in the load function. Any help would be great thanks: error C2679: binary '>>' : no operator defined which takes a right-hand operand of type … | |
Is there a diffrence between the GetTickCount() and rand() functions ? I read they both are Psuedorandom number generators , I would like to know if there is any diffrence between those two functions , I used rand() once and the output was the same each time the program run … | |
i need to write a c++ program for the simple edlin test editor. can any one give me a hint on where i should start off i am not sure about how the edlin text editor handles text files and how it in general functions. thxs | |
i have a book to learn c++ and i have a peice of code that they are saying to compile and it is showing an error on line 15. here is the code: // // Program to convert temperature from Celsius degree // units into Fahrenheit degree units: // Fahrenheit … | |
Here is a little of my program: struct Town { int population, outbreaks; }; const int MAX_ROWS = 39; const int MAX_COLS = 39; void GetInfRate(Town[][MAX_COLS], int); //some other functions int main() { Town coordinates[MAX_ROWS][MAX_COLS]; //I load my data // I display menu, etc. } void GetInfRate(Town c[][MAX_COLS], int MAX_ROWS) … | |
I havent studied C# for about 2 yrs and was recently given this simple problem but I'm a little lost on how to start solving this any help would be great Write a program to grade a set of true/false tests. There are 15 true/false questions. True is represented by … | |
error reads: body has already been defined for function 'main()' program is as follows: search.h file [code]// display files in a directory #include <stdlib.h> #include <dir.h> #include <dos.h> #include <string.h> #include <iostream.h> #include <fstream.h> ofstream outfile("output.dat",ios::out); class dispfiles { public: int showfiles(void); char allfiles[MAXPATH]; private: char *getdirectory(char *path); char curdir[MAXPATH],temp[3]; … | |
Why are the standard header files in C++ so non-standard? Particularly iostream seems to be the most dialectal. Enough to make the whole language a mess to work with! | |
Hi everyone, I have been writing a program that resembles the "WHICH" program of LINUX for the Windows Platform. It accepts a program from User Input and tries to look for it in the registry. But unfortunately, there is a lot of memory corruption and i cannot even add lines … | |
Hi, I'm taking an online C++ class and having some difficulty understanding the assignments. Can someone please look at the code I wrote to ensure validity? I am not asking for the answer just some guidance, I’m totally lost. The assignment is as follow: Write a prg to convert numbers … | |
I almost got my user defined string class to work but not quite. When I execute the program, I get a memory error. Code is as follows. #include <iostream> using namespace std; class String { char *str; //pointer to character block public: String(); String (char *s); void setString (char *s); … | |
I've done a little simple C++ programming but what I need now is way beyond my capability. I have a PCI soft modem that is not working. See thread under Hardware "search on Dick." I've exhausted all machine ideas to find out why it won't work. I'd like to write … | |
Im getting some interesting error messages when i try to compile my program here is the error messages: expected unqualified-id before "namespace" expected `,' or `;' before "namespace" expected namespace-name before ';' token '<type error>' is not a namespace Here is my code...any help would be greatly appreciated #include <iostream> … | |
I am just learning C/C++. My problem is to determine if a character is or isn't within an array then returning an appropriate message to the user. I've only gotten this far using 'strchr' without much success. Any suggestions or help would be appreciated. Should I be using pointers instead … |
The End.