49,761 Topics

Member Avatar for
Member Avatar for AmrMohammed

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 …

Member Avatar for mike_2000_17
0
257
Member Avatar for slygoth

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 …

Member Avatar for Ancient Dragon
0
130
Member Avatar for fonzi

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 …

Member Avatar for Schol-R-LEA
0
312
Member Avatar for daesung

#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; …

Member Avatar for amrita111
0
77
Member Avatar for ShEeRMiLiTaNt

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 …

Member Avatar for ravenous
0
96
Member Avatar for joey777
Member Avatar for JorgeM
0
188
Member Avatar for sanghai45

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 …

0
80
Member Avatar for Kyle Willett

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 …

Member Avatar for Kyle Willett
0
250
Member Avatar for Carc369

For instance... say that I set char a = 'a' char b = 'b' how would I combine them to make them "ab" using strcat?

Member Avatar for Lucaci Andrew
0
321
Member Avatar for Teaba W.
Member Avatar for Lucaci Andrew
0
55
Member Avatar for highonbikes

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** …

Member Avatar for Lucaci Andrew
0
151
Member Avatar for ktsangop

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 …

Member Avatar for ktsangop
0
1K
Member Avatar for AdLab

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 …

Member Avatar for AdLab
0
529
Member Avatar for Carc369

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 …

Member Avatar for Ancient Dragon
0
389
Member Avatar for queenofsupernatural

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 …

Member Avatar for jalpesh_007
0
208
Member Avatar for alyssa.wilkins.77

#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 …

Member Avatar for dx9_programmer
0
330
Member Avatar for Vish0203

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++ …

Member Avatar for rubberman
0
204
Member Avatar for sivate
Member Avatar for Carc369

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] = …

Member Avatar for rubberman
0
143
Member Avatar for slygoth

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 …

Member Avatar for slygoth
0
161
Member Avatar for chris.vargas.773

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 …

Member Avatar for dx9_programmer
0
133
Member Avatar for chris.vargas.773

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-- …

Member Avatar for dx9_programmer
0
172
Member Avatar for sabrimev

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.

Member Avatar for myk45
0
101
Member Avatar for kayceedude

`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 …

Member Avatar for kayceedude
0
463
Member Avatar for daino

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 …

Member Avatar for daino
0
1K
Member Avatar for Carpetfizz

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 …

Member Avatar for Carpetfizz
0
227
Member Avatar for pattilupwned

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 …

Member Avatar for dx9_programmer
0
362
Member Avatar for scott88cooper

#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 << …

Member Avatar for Ancient Dragon
0
176
Member Avatar for amendonca

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 …

Member Avatar for Ancient Dragon
0
160
Member Avatar for Some Dude

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. …

Member Avatar for Some Dude
0
621

The End.