49,757 Topics
| |
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++? | |
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] | |
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 … | |
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 | |
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. … | |
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 … |
The End.