49,761 Topics
| |
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 … | |
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? | |
| 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 … |
hi everybody, i would be glad if someone could show me how the Get and Set functions work. thanks. | |
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 … | |
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 … | |
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 … | |
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]; … | |
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 … | |
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. | |
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> … | |
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 … | |
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. … | |
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") { … | |
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 | |
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 … | |
hi all how to find the size of int without using sizof operator thanks in advance | |
[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] | |
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; … | |
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:?: | |
hi all, I do not uderstand how to implement the selection sort algorithim in c++ Thanks in advance | |
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 … | |
Hi, I have to acess a vector, which is a member of a structure... Could you please help me.. | |
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 }; // … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++? |
The End.