49,761 Topics
| |
Greetings I wanna know what is going inside the steps when compiling a C++ source code to native code. I know the steps are such that: 1- Preprocessor copies the contents of included header files into the source code file. Q1: So how would the C++ source code file look … | |
I have been trying to read back the information from a file that i created. I get all the information i need out of the file but now all i want is to use the display function from the linklist to get that information. I would like it if the … | |
Hey guys, I am curious on how to start automated testing, and what kind of software or scripts would i need to test java, c , c ++, c#, or python code. Also does anyone now any good well explained videos or websites out there, i tried searching on google … | |
#include <iostream> using namespace std; main() {intx,charge; float a,b,c; cout<<"case 1<=2hours,case2<=3hours,case3<=4hours,case4<=5hours,case5>6hours\n"; cout<<"pls enter your time entry\n"; cin>>a; cout<<"pls enter your time exit\n"; cin>>b; c=b-a; cout<<"no of hours park is\n"<<c; cout<<"pls enter no of case according to your no of parking hours\n"; cin>>x; switch(x) { case 1:cout<< "the charge is RM2.00\n";break; … | |
Hello I am having a problem with this function. Everything works fine until it reaches the `delete []dynamicArray` line. Can someone please tell me why it would crash at this part? string* addEntry(string *dynamicArray, int &size, string newEntry) { string* hold; hold = new string[size + 1]; for (int i … | |
I would like to see another example of a solution for Deitel's 8th edition 6.20 | |
What is grid base concept ? How do we make grid base game ? then what is Tilebased game ? What is the difference ? I know that bomberman,farmville etc are grid based game are they called tilebased also ? How do we create grid and place objects on it … | |
Hi Im not sure if this question belongs in the form so sorry if it doesn't. Here is my question, in a cs class of mine we have to write a make file that compiles the two seperate programs in the project. The only problem is that none of the … | |
For instance... say that I set char a = 'a' char b = 'b' how would I combine them to make them "ab" using strcat? | |
i need help with how can i begin with 3d programming please help me | |
This is an assignment from school, I have spent a week bashing my head against the wall atrying to figure out how to get this to work. The program reads in a 'maze' or X's and stuff from, a file, and my functions are to fill a pre diminshied char** … | |
Hello everyone! I am building a mfc dialog based application in visual c++ 6 and using mysql c api to connect to a database. What i need is a simple type of data grid to show mysql query results in a dialog. I do not need to edit, update, save … | |
Hi Everyone, I'm trying to interpret some data from an embedded sensor device into a C++ program. The device uses a numerical format called 1.15 fractional format. This means it transmits 2 hex bytes into a value rangle of ~1 < n < -1. A full description of the format … | |
How do I combine two c-style strings together? Basically I'm trying to see if the first letter is in the dictionary... then if it is.. check if the first and second letter are in the dictionary.. and if it is... check if the first, second, and third letter are in … | |
void main() { cout<<"Can somebody fix this?"; } hi, i'm new to C++ programming. that was my code... i'm using Turbo C++. It's showing so many errors!.. I don't know what to do. Please help!! the errors are listed as follows: Compilong XYZ.CPP Error XYZ.CPP 1: Unable to open include … | |
#include <iostream> #include <fstream> #include <string> using namespace std; const int numRows=5; const int numCol=7; void openfile(ifstream& , ofstream& ); void initialize(ifstream& , ofstream& ); void ave(ifstream& ,ofstream& , double , double,string ); void printout(ifstream& , ofstream& ,string ,double ,double ); int main(){ ifstream infile; ofstream outfile; string names[numRows]; double … | |
Hi.. can anyone tell me what is the meaning of this error?? [Error] cannot convert 'std::string {aka std::basic_string<char>}' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)' When I'm taking TeamName as char TeamName[30]; , the compiler shows linker error. what could be the problem? I use DEV C++ … | |
For instance, shouldn't the following code work if I wanted to pass an element of a 2d array? if not what would be the best way to do it? Thank you! #include <iostream> using namespace std; void randomProgram(char random[][]){ random code inside of here; } int main(){ char letters[6][6] = … | |
I am working on this project and i am going to need to write information and retrieve them from a file. I get all the information needed but i am not sure how to write it to a file and how to get it back. if (id.is_open()) { cout<<endl; cout<<"Enter … | |
For an assignment for class i wrote this code right but the only problem i have is that i can't get the right value that assignment wants which is distance so far: 0 meters distance so far: 1000 meters distance so far: 0 meters distance so far: 0 meters distance … | |
i wrote this code for sending and recieve mail but i can't get the output that is required for class which is -Test 1-- Creating a new envelope Addressing from Muffin To Howie Inserting the message: Pet me! Affix Postage: 0.33 stamp Sealing the envelope Mailing the envelope --Test 2-- … | |
Anyone has idea to seperate a word in parts for example ( kalemimin -> kalem-i-min ) 'kalem' is str1 , 'i' in str2 and 'min' should be get into str3. | |
`Inline Code Example Here` I have been trying to solve this but i just can't get it right... can someone help me pls? Using array to summarize survey results 40 Students were asked to rate the quality of the food in the student cafeteria on a scale of 1 to … | |
I'm trying to build libpng which has worked up to a point. I'm using Windows XP, and have a MingW compiler. I also have MSYS installed and am using it to configure libpng. The issue I'm having is that libpng can't find zlib. I've tried every variation under the sun … | |
Hello, My friend and I were done with our work in math class, and threw together this little text-based rpg in like ten minutes. Anyway, we're having a small issue, everytime I press the "2" for "Fight!" the loop regenerates the random values and we mysteriously gain health that was … | |
Hello, I am writing a program that reads in data from a text file and puts it into a linked list. Certain variables are read in only if the "officeHeld" number is a particular number, otherwise the variable is set to 0. When I run this through Visual Studio, I … | |
#include <iostream> #include <iomanip> #include <string> using namespace std; void getInput (double& currentPrice, double& prevYrPrice, double& twoYrAgoPrice); void calculateInflation (double currentPrice, double prevYrPrice, double twoYrAgoPrice, double & currentInflation,double & preInflation); void printOutput (double currentInflation, double prevInflation); int maine () void getInput (double& currentPrice, double& prevYrPrice, double& twoYrAgoPrice); { cout << … | |
Define a function drawRectangle with the following prototype: void drawRectangle(int width, int height, int offest); The function will print a rectangle made out of height rows with '@' character repeated width times on each row. The first @ on each row will be preceded by offset spaces. That means the … | |
Alright, so I need some more help. This time, the problem is not inherently in the code (Though I've had trouble with that thus far too). I am currently playing around with open and close file dialogs trying to get what seems to be an out-dated "GetOpenFileName()" function to work. … |
The End.