49,761 Topics
| |
I need help deleting from a vector. My program is about the josephus problem. It has to delete soldiers. It does deletes the first one but then it stops. Thank you! | |
This is my program: There is a secret government organization called PIB which only accepts recruits who fit their criteria (shown below). If you fit any of the combinations of criteria, then you can apply to work for PIB. Write a program which asks the user appropriate questions (ask all … | |
I have this project where I have push characters onto a stack from phrase until either one of the characters in encrypt1 is encountered that's also in the the phase. Then, it is supposed to stop and pop and print off the characters in the stack until it gets to … | |
Ive began a book to learn c++ and in the first chapter I ran across my first question(thats never good...). In the book it says I should use this same template in every single c++ program I EVER make. The template is [CODE] #include <cstdio> #include <cstdlib> #include <iostream> using … | |
The requirements are actually simple, just asking to sort a few, say 10, 20 or so, intergers in ascending order. However, array and pointers are not allowed to be used, and just the fundamental knowledge about flow control are permitted. The hints are as follows: 1. Initialize a variable F … | |
hello, i got a error, declaration of string shadows a parameter...mind help me with it [CODE]#include <fstream> #include <string> using namespace std; int numToRom(string&,string&,string&); int main() { string data; string result; string romNum; cout<<"Please enter a number"<<endl; cin >> data; numToRom(data, result, romNum); cout<<"Output : "<<result<<endl; } int numToRom(string& data, … | |
Hey guys, I'm new to C++ and in desperate need of help. I'm trying to write a program that is like powerball. I need to generate six random numbers. The first five numbers need to be in the range of 1-55 while the sixth number is in the range of … | |
Hi all, Ok, I've just been trying to write a program that will convert MPH (miles per hour) into the number of minutes and seconds it takes that person to run one mile. This is what I have: [code=cplusplus] #include <iostream> using namespace std; int main() { double mph, count … | |
I am trying to do the [B]bubble sort[/B] to make my numbers in the array go from smallest to highest. Afterwards, I want to use the [B]SeqOrderedSearch[/B] to find the location of the number in the array. If the number is not found, i will have to state it is … | |
so i have spent 3 hours trying to figure out how exponents work in C++ but now. my if statement isnt working. even if i punch in a 0 it spits out 1 thanks in advance [CODE]#include<iostream> #include<string> #include<cmath> using namespace std; void binToDec(string getBinary); void main() { string getBinary; … | |
The following program should take 4 numbers but it takes 5 numbers and prints first 4 number entered. How to correct the problem??? [ICODE]#include<stdio.h> #include<conio.h> void main() { int a1,a2,a3,a4; printf("Enter 4 numbers \n"); scanf_s("%d %d %d %d ", &a1,&a2, &a3, &a4); printf("The 4 numbers entered are %d %d %d … | |
I'm new to C++ and I wondering what is the best program to use to type code into? I use vista so if a c++ program requires some extra work to make it work can you tell how to make work as well? Thanks for reading! | |
Hey everyone, I typically don't like to go on forums and throw my code at people and expect answers... but, I'm a beginner (and a little desperate) with all this so a little help would be much appreciated. Here's the details: [LIST] [*]The purpose of the program is to have … | |
I want to do somthing like this. [code=C++] ifstream My_File::GetFile_Stream() const { return(this->Input_Stream); } [/code] where Input_Stream is a private member of the class My_File and is declared as follows: ifstream Input_Stream; When I compile I get the following errors: /usr/include/c++/3.3.1/bits/ios_base.h: In copy constructor ` std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> … | |
I am a new user and I am looking for some help with one of my problem. I have to write a program that reads in from a file through structs and store the information in a single struct and write the code to display a single class. This needs … | |
I'm having trouble with this section my code and am hoping that you can help me diagnose and solve the problem. I'm not sure if it makes a difference, but I compile and run my code in Cygwin. The problem: At run time when the program asks for the user … | |
Hello everyone! This is my first posting :). I am having a segmentation fault with my program. It compiles fine. When I run the debugger, my program immediately crashes. Could someone look at my code and help me where I went wrong? | |
How can I have a switch command send to a ftp site? I am trying this out in php. Here is what I have. Instead of $to_email is there one for URL? Thanks everyone. Erich switch($attn1) { case 'employees': $to_email = "ftp://myftpsite@rgl-e.com"; break; | |
I was wondering if there is an easy library that allows reading in a .bmp, mask it, then display it. I believe I could read it in with [URL="http://www.adp-gmbh.ch/win/programming/graphic/bitmap.html"]this[/URL] but I cannot do anything else with it. Your help is appreciated! Any suggestions? | |
I'm having trouble initializing Objects while they're inside if else statements. I'm using Visual C++ 2008. for instance: [CODE] class Account { Account(); Account(int = idnum, double creditLimit = 500.00); Account(double initBal, int idnum, double creditLimit = 100.00); public: somefunction(); }; if (a > 0 && b > 0) { … | |
I am a noob therefore this question is hopefully very easy for someone to answer! in my code i have asked a question if the answer is yes i want the program to continue onto the next question (this is fine) if however the answer no or enter an incorrect … | |
can someone help check my code? i m trying to create multi dimension array with classes. it will not compile and i do not get the error message. thanks alot. [CODE=cplusplus]#include <iostream> using namespace std; const int MAX = 5, MAX2 = 3; class notebook { int num; public : … | |
Hi, May I know how to declare a Class in C++ window application form? Below is my code and error as shown below as well. here is my class declaration: [code=cplusplus] public ref class CLoadObj { public: bool ImportObj(t3DModel *pModel, char *strFileName); System::Void ReadObjFile(t3DModel *pModel); System::Void ReadVertexInfo(System::Void); System::Void ReadFaceInfo(System::Void); System::Void … | |
I want to learn how to use stack and ques in c++, but I don't know how to start. Where should I look on the internet? Or does anyone have any ideas? | |
I've been using visual studio 6 for a couple of years now, and every programer that I have asked this has said, "geez I dunno how to do that." Basically, my problem is that I can't figure out how to get the debugger to show me the contents of c++ … | |
Alright I know you dont help on homework, but I have don't so much I just need a little guidance on the ending. I just need to make my number guessing game ask the user if they would like to play again and keep there bank. The assignment: [url]http://www.glennstevenson.com/c++online/syllabus/midtermfall2008/midterm.html[/url] Heres … | |
firstly hi all, i''d like to intrroduce myself. Im a new C++ programmer..hardly..but trying..so yes its frustrating with the error and syntax mainly. Anywayz, this is a card game with 2 classes and simple functions but im having a problem compiling it. I compile it on visual studio so i … | |
Hi, I know how to subclass a RichEdit, and the messages I handle in my procedure work, but I want to know how to call the default procedure that would proccess a non-subclassed RichEdit Control. My problem is that when I subclass it, I want the default Procedure to take … | |
can someone look at this? in theory it should work but i cant figure it out thanks in advance [CODE]#include<iostream> #include<string> #include<cmath> using namespace std; void binToDec(string getBinary); int main() { string getBinary; cout<<"Enter a Binary Number:"<<endl; cin>>getBinary; binToDec(getBinary); return 0; } void binToDec(string getBinary) { int setLength,total=0; double placeholder=0; … |
The End.