49,756 Topics

Member Avatar for
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
520
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
321
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
142
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
160
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
132
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
171
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
100
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
461
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
218
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
354
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
158
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
615
Member Avatar for Monster99d

I have Visual Studio 2012 Ultimate. I tried creating a Win32 Program and there are no debugging errors. However, when I debug it, the window I am creating should be shown on screen, but there is no window. All I see is my code. Why would this happen? #include <Windows.h> …

Member Avatar for nullptr
0
107
Member Avatar for BlinkOnly

I wrote a program to simulate a simple page flip animation in opengl and now i'm trying to replicate it with two images using texture mapping so that the second image appears on the "back" of the first image during the drag of the lower left corner of the page. …

0
154
Member Avatar for kusel1030

For a program i'm writing I need to read a .txt file into a 2-d array. The txt file contains spaces that need to also be read into the array, so I was told I need to use getline, but after searching google and this site i'm not sure exactly …

Member Avatar for omarelbeik
0
247
Member Avatar for Elixir42

Hi I am setting the sampler states initially then setting them on the fly with keypresses that I know runs but I dont see anything changing. Am I missing something. Can I just call SetSamplerState(...) anytime or do I need to call something after? static bool bToggleH = false; static …

Member Avatar for Elixir42
0
225
Member Avatar for poloblue

Good Morning, I just want to know how to implement a body initilization in a class. Below is the class information. class A { private: const int size; //a const data member char *cat; public: A(); //default constructor A(const int n); //constrcutor with parameter void print(); //print A ~A(){delete[] cat;}; …

Member Avatar for Stagnant
0
136
Member Avatar for Kamina00

Hi I was just looking up the difference between cin.get() and cin.getline(). It seems they can both function the same way except cin.get() keeps the delimiter in the buffer while cin.getline() throws it out. My question is with this code: char name[200]; char name1[200]; char name2[200]; string hi; cin >> …

Member Avatar for Kamina00
0
1K
Member Avatar for shanna62

Hi, In the program below, in the cout statement I want to understand what the code in the (ptr –arr) is doing. I understand ptr is the result of the find algorithm but I don’t know what the –arr does. If you can explain that to me I would appreciate …

Member Avatar for shanna62
0
323

The End.