49,761 Topics

Member Avatar for
Member Avatar for vrga

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!

Member Avatar for Sky Diploma
0
124
Member Avatar for joed13k1941

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 …

Member Avatar for Sci@phy
0
85
Member Avatar for Trekker182

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 …

Member Avatar for Trekker182
0
134
Member Avatar for rysin

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 …

Member Avatar for rysin
0
102
Member Avatar for wqzerboom

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 …

Member Avatar for rhoit
0
182
Member Avatar for ohara

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, …

Member Avatar for ohara
0
127
Member Avatar for Benbon86

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 …

Member Avatar for Benbon86
0
683
Member Avatar for nuubee

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 …

Member Avatar for Ancient Dragon
0
235
Member Avatar for NinjaLink

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 …

Member Avatar for Ancient Dragon
0
191
Member Avatar for egolovin

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; …

Member Avatar for grumpier
0
169
Member Avatar for PhoenixInsilico

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 …

Member Avatar for ahamed101
0
75
Member Avatar for Kainan54

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!

Member Avatar for Kainan54
0
126
Member Avatar for pat7047

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 …

Member Avatar for ArkM
0
110
Member Avatar for gangsta1903

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> …

Member Avatar for gangsta1903
0
2K
Member Avatar for mathrules

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 …

Member Avatar for mathrules
0
126
Member Avatar for LordoftheFly

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 …

Member Avatar for LordoftheFly
1
306
Member Avatar for DLightman

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?

Member Avatar for DLightman
0
58
Member Avatar for krauz2

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;

Member Avatar for krauz2
0
84
Member Avatar for nizbit
Member Avatar for dmanw100

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?

0
102
Member Avatar for mbayabo

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) { …

Member Avatar for chunalt787
0
138
Member Avatar for afromong

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 …

Member Avatar for chunalt787
0
107
Member Avatar for chern4ever

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 : …

Member Avatar for chern4ever
0
113
Member Avatar for yu83thang

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 …

Member Avatar for yu83thang
0
237
Member Avatar for seogoat

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?

Member Avatar for dmanw100
0
104
Member Avatar for cathyf

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++ …

Member Avatar for cathyf
0
200
Member Avatar for FtKShadow

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 …

Member Avatar for Sky Diploma
0
134
Member Avatar for avillachandok

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 …

Member Avatar for avillachandok
0
129
Member Avatar for killdude69

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 …

Member Avatar for Ancient Dragon
0
245
Member Avatar for egolovin

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; …

Member Avatar for egolovin
0
329

The End.