49,761 Topics

Member Avatar for
Member Avatar for Sh0gun

I'm trying to find the mode of a vector full of ints. To do so I created a map an tried to make it so that evey time a number occurs it increments the related key on the map. Right now I'm just getting the highest number in the vector …

Member Avatar for subith86
0
174
Member Avatar for free2move

I need to sort a series of 25 numbers, entered by the user from smallest to largest, then count the number of times the user entered the number "10". I can't use arrays and I have to use only for loops, can someone please help?

Member Avatar for free2move
0
2K
Member Avatar for mechanicallogic

I simply cannot figure this program out (nor why I am going in debt paying professors to "teach" me). Our assignment begins with reading a data from a file and storing it in an object array and then displaying the contents of that array. When I compile the program in …

Member Avatar for Ab000dy_85
0
221
Member Avatar for rayy

hi everybody, i would be glad if someone could show me how the Get and Set functions work. thanks.

Member Avatar for promod
0
114
Member Avatar for jtreiner

I am using Irrlicht with code blocks on a Mac osx. Whenever I try to run the Irrlicht wizard in code blocks I get an error that says "The path you entered seems valid, but this wizard can't locate the Irrlicht's library file in it." I am using the most …

0
136
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
756
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
153
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
135
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
394
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

The End.