49,757 Topics

Member Avatar for
Member Avatar for Jay22

I need help fixing this one error with my code. Below Im going to upload a piece of the code which im having problems with and the output error . [CODE]int main() { int vals[100]; fstream file; string line = "----------------------------------------------------\n"; string msg2 = " Please select an option from …

Member Avatar for Jay22
0
215
Member Avatar for adamjrleask

THIS IS A MAZE ON A TUTORIAL I AM TRYING TO MAKE < I AM TRYING TO GET TO GRIPS WITH IT ALL, THE MORE I TRY FIX THE ERRORS THE MORE I GET, THANKS TO ANYONE WHO POSTS [CODE] maze.cpp : main project file. #include "stdafx.h" #include "Form1.h" using …

Member Avatar for adamjrleask
0
364
Member Avatar for ahu

I am new to programming. I have the below code and It need to output the vote, percentage, winner, and total. I am totally lost please assist: #include <iostream> #include <string> #include <vector> using namespace std; struct electionList { void print() const; void voteTotal(); void solvePercentage(); void calcWinner(); int votes[100]; …

Member Avatar for WaltP
0
2K
Member Avatar for montjoile

Hi. I'm having a problem with a module in a program written in powerbuilder An event is triggered when the user change the focus to a specified textbox the event creates local variables that I set to null, then I read a string that comes from the lecture of a …

Member Avatar for WaltP
0
193
Member Avatar for hello2419

Im wondering would anyone be able to help me with making a scoreboard in c++ for a football game...Any help would be great as i cant find any info on the net.

Member Avatar for VernonDozier
0
804
Member Avatar for johnnyzats

So this program is supposed to take in a sentence and output it with correct spacing and capitalization. -For example if I entered: heY, How are You doing? -the output should be: Hey, how are you doing? The program runs fine, I just cannot get it to output. [CODE]#include <iostream> …

Member Avatar for WaltP
0
754
Member Avatar for newbie1234

HI every one, I know this is stupid question. But i am new bie in c++. Can you please tell me. Question: I have two file a.cpp and b.cpp. i want to give output (some number) of a.cpp to as a input on other file b.cpp. And b.cpp will take …

Member Avatar for WaltP
0
124
Member Avatar for personathome

Hello, For my homework I have to do about 14 functions and I have figured out all but two of them. This one; int toNumber( char c ) If the character passed in is a numeric digit, then the integer value (not the ASCII code) of that digit is returned. …

Member Avatar for Bench
0
233
Member Avatar for ruval002

i have a problem with my following code, note: this is just part of my code when i run it, lets say i enter hello world it will output: hello segmentation fault is there a way i can fix this? [CODE] void input::read_line() { string command; while(command != "exit") { …

Member Avatar for Ancient Dragon
0
189
Member Avatar for ilearnz001

Currently looking for a guide on socket.h more specificly Linux Version > sys/socket.h Can't Find any start up tutorials on the net if someone has a link(s) that helped them understand sockets please post//pm me them. --Thanks, ilearnz

Member Avatar for deceptikon
0
111
Member Avatar for torrm

Hello all, I have been learning C++ on and off for some time and it hasn't yet sunk in, mainly due to time constraints. I purchased "Sams teach yourself C++ in 24 hours" which whilst seems okay I find myself reading it to finish the book opposed to taking in …

Member Avatar for thines01
0
230
Member Avatar for prasenjit_das
Member Avatar for Ali_2101
0
152
Member Avatar for newbie1234

[B]I want to use 128 Bit pseudo random function generator in my acadmic project. But i did not found. Can any one please tell where i can get it in c++ or c language. Thanks in advance[/B]

Member Avatar for newbie1234
0
1K
Member Avatar for gabriellogan

Can you help me find the errors with this code: [CODE]class MyClass { private: char * pcMyString; MyClass( MyOldClass oOld ) { pcMyString = new char[strlen(oOld.pcMyOldString)]; }; MyClass( MyClass * oObj ) { pcMyString = oObj->pcMyString; poMyOld = oObj->poMyOld; }; void calcOffset_Helper() const; public: MyOldClass * poMyOld; bool isStringEmpty() const; …

Member Avatar for gabriellogan
0
134
Member Avatar for inspire_all

i recently read that quick sort is most popular algorithm.it has a good efficiency but its not stable.can anyone plz explain me quicksort algorithm in short.i am not able to get it:?:

Member Avatar for inspire_all
0
157
Member Avatar for prasenjit_das

hi all, I do not uderstand how to implement the selection sort algorithim in c++ Thanks in advance

Member Avatar for WaltP
0
75
Member Avatar for belle_tenor

I am fairly new to C++ programming and have been working on an assignment for my C++ class that involves writing a dice rolling program (rolls 2 dice). The program is to get a random seed number and a desired number of rolls from the user, keep track of the …

Member Avatar for WaltP
0
696
Member Avatar for MochiAnjali
Member Avatar for subith86
0
200
Member Avatar for broodwich

I am getting syntax errors and stuff with this and i am trying to make a program where its rock, paper, scissors where the computer plays the user. any help would be awesome [code] #include <iostream> #include <ctime> using namespace std; enum Choice { Rock, Paper , Scissors }; // …

Member Avatar for crunchie
0
164
Member Avatar for Panathinaikos22

Hi, im new in Window Programming... i use this book -> (Programming Windows - Charles Petzold) This is my code [CODE]#include <Windows.h> #include <tchar.h> #include <stdio.h> LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE previnstance, LPSTR szCmdLine, int iCmdShow) { static TCHAR …

Member Avatar for Panathinaikos22
0
144
Member Avatar for hitholdir

Hello everybody, I am trying to write a program consisting of two parts: 1. It lists of letters before and after a certain letter (if the user requested 2 letters regarding 'e', it would be cd and fg) 2. count the number of letters in each word of a sentence …

Member Avatar for hitholdir
0
354
Member Avatar for Gilbert_1990

i have this code and i am trying to make this [CODE]cout << (rand () % (1 + max - min) + min ) << "\t";[/CODE] into something like this [CODE]cout << rand (range) << "\t";[/CODE] and this the code [CODE]#include <iostream> using namespace std; int main () { srand …

Member Avatar for gerard4143
0
71
Member Avatar for caltech

Here's my full assignment below, and then the code I have so far to follow. I'm up to Step 4 of the assignment... need some insight to kickstart my flow. Much appreciated. [QUOTE]The ABC Corporation wishes to review a group of its products based on their performance in the prior …

Member Avatar for caltech
0
136
Member Avatar for phorce

Hello, In my class I have a method that basically does this: - Reads in characters from text file (as a string) - Converts the characters into an integer - Stores the values into the integer Here is the code: [code] bool Loader::Read(string theFile) { strRepositry = theFile; string theData …

Member Avatar for phorce
0
117
Member Avatar for kikic

I made union of two strings with letters. I need to write function in C++ which sort letters in union. example union is "acefd" I need result "acdef" Could someone help how to write the function for this in C++?

Member Avatar for Bench
0
257
Member Avatar for ProgrammingGeek

How would I do this [CODE] class test { public: int* num; }; int main() { test *d = new test; d->num = new int; d->*num = 3; cout << d->*num; } [/CODE]

Member Avatar for ProgrammingGeek
0
135
Member Avatar for radiat

I've a question on dynamic memory. As i understand it, i can create a dynamic memory array using: xxx= new int [z]; Then I can set the value of 'z' to be whatever value i want during the program. But if i create a dynamic memory array using a predefined …

Member Avatar for Bench
0
190
Member Avatar for swissknife007

x*y = a + b*lcm(x,y) + c*gcd(x,y) I have to solve this eqaution.How to make a solution for it. here a,b,c<=10^6 Any suggestions

Member Avatar for StuXYZ
0
106
Member Avatar for compsci91

Question: So basically using the class below I want to create polynomials as can be seen in the example: Command: s Set coefficient. Give A n c: x 3 33.33 Command: o Output poly. Give A: x Polynomial x: 0x^0 + 0x^1 + 0x^2 + 33.33x^3 Command: s Set coefficient. …

Member Avatar for compsci91
0
199
Member Avatar for phorce

Hello I'm working on a project, and I have the following classes: [LIST] [*]Loader - This loads the contents of the text file [*]Matrix - This processes the data that has been loaded [/LIST] Now I'm using association, Loader -> Matrix In my matrix class I have a method that …

Member Avatar for histrungalot
0
163

The End.