48,983 Topics
|
|
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 … |
|
i get a couple error messages when i try to compile this program...I dont understand how to fix them and i was hoping for some help.....The error messages i get are: error C2146: syntax error : missing ';' before identifier 'inData' error C2501: 'ifstream' : missing storage-class or type specifiers … |
|
Hi, I use a Borland compiler. How do I colour text (in a DOS enviroment)? |
|
im trying to insert a number into an array but when i insert a number it deletes the last number instead of increasing the array size by one....this is the code i have: void Insertion(float T[100],int size) { float target = 0.0; cout<<"Enter the number you are inserting"<<endl; outData<<"Enter the … |
|
im trying to insert a number into an array but when i insert a number it deletes the last number instead of increasing the array size by one....this is the code i have: void Insertion(float T[100],int size) { float target = 0.0; cout<<"Enter the number you are inserting"<<endl; outData<<"Enter the … |
|
Hi, I'm having trouble on transfering "input.txt" over to "output.txt" what command shall I use with C++ language? Anyways below is the question I needed to answer on monday, anyway help will be very very appreciated. write a program to compute numeric grades for a course. The course records are … |
|
Hello all, i am new to C++ and im writing a little encryption program for fun. It requires the user to enter a 'passkey', which is a string (numbers, and letters). Then the program defines the ASCII value of all of the characters, and places them in the string - … |
|
STILL trying to figure out how to link files in C++ in a UNIX environment!! i just don't get it. how do i make .o files? what are they for? how do you "link" them with other stuff and "run" them. all i am capable of is g++ somepgm.C and … |
|
Hi, I been trying this problem for 2 days and monday 31st is the due date :( I tried to use a while loop but the numbers I get are not even close. What I did on the [B]Enter your code[/B] is the codes below the question [code] //******************************************************************************************** // … |
|
This is my 1st time working with C++ and im trying to learn the lanuage. I am writing a program that figures out the total sales data for five products. The code for the program is: #include <iostream> #include <iomanip> using namespace std; int main () { int product; int … |
|
hi there. i am on a UNIX system and am writing a template code called Array.h. it is called by a Test2.C file which does nothing more than declare a T object of type int. Array<int>. i am getting all kinds of compile errors. have been over it and over … |
|
Does anyone know how to use an array of files? The array is defined as: fstream F[10]. I have 10 temp files that I need to use but am not sure how to open these temp files or write to them. I have a counter to keep up with which … |
|
In C++ visual studio .net, I'm dividing two integer variables and trying to put the answer in a double variable. How do I get two integers to divide and give me a double data variable answer? Thanks doub_a = inta / intb .75 = 9/12 |
|
hey folks, i have a template created that holds an array of type T elements. my problem is this ... i am converting this code from a souped up Array class that takes ints as it's elements to this template Array<T> class that will hold T elements. in the original … |
|
I would like to transfer a file from a server to a user for the user to read. I would like to be able to insure that the user can view, but not save or print the file. I am willing to write a user tool to enable viewing and … |
The End.