49,761 Topics

Member Avatar for
Member Avatar for xtremerocker

I'm currently working on ProjectEuler.net's problem no. 39 and it states "If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p <= 1000, is the number of solutions …

Member Avatar for xtremerocker
1
124
Member Avatar for shadowfire36

i was giving an assignemnt to show stacks with out using the STL . my question is is my code a correct example or not ? and if so can some some one guide or explain to me what i did wrong or what i need to change [code] #include …

Member Avatar for Salem
0
147
Member Avatar for shadowfire36

im doing this example project, but i cant seem to figure out why visual studio 2008 keeps giving me error C2075-'Target of operator new()' : array initialization needs curly braces. it says the error is on line 47 [code="cpp"] #include <stdio.h> #include <string> #include <vector> class Foo { std::string _str; …

Member Avatar for kbshibukumar
0
617
Member Avatar for christiangirl

Hey, I am having trouble with the file I/O part of this program. It seems to start at the end of the files contents and not go into the while loop. [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority * * Takes input from file …

Member Avatar for cikara21
0
154
Member Avatar for mumblejum

I need to write a C++ program. I'm usually pretty decent with C++ but with this one I'm lost. I have to write a program that basically checks to make sure that the braces creating a block in a cpp file are balanced. I'm not looking for anyone to write …

Member Avatar for StuXYZ
0
439
Member Avatar for rEhSi_123

Hello, I am a newbie in C++....I am trying to modify program to read in upto four words or 30 characters into a string and then print it out. Here is the code..... [code] #include <iostream> #include <conio.h> using namespace std; int main() { bool isWord = false; char ch; …

Member Avatar for death_oclock
0
93
Member Avatar for kacumbo

Ok i have been working on this for a few days and can not get my main right. I have tried so many diffrent things and couldnt get it any help is appreciated. Design, write, and test a program that simulates some aspects of a simple savings account in a …

Member Avatar for Ancient Dragon
0
587
Member Avatar for peacerosetx

Greeting All, Peace. New to this forum and am confused about how to approach data analysis of variables with C++. My question I is am simply going to do simple descriptive statistics (mean, mode, variance), and a little more complicated chi square / correlation (Pearson). The approach that I am …

Member Avatar for Lerner
0
182
Member Avatar for Clockowl

Hey guys, I was wondering if the stringstream class copied the string to itself or just keeps a pointer. Because if it copies I can free or clear the string without fearing for the data in stringstream. EDIT: Like this: [code=cpp] string stringz0r("Chickenz"); stringstream streamz0r(stringz0r); //will this not affect the …

Member Avatar for Clockowl
0
120
Member Avatar for rickster11

Ok, new to C++, I bet this is a real easy question. Every time I input a char, it enters the same char twice to variable. So when I enter "r", and then output it..it outputs "rr" [code=c++] #include <iostream> #include <fstream> using namespace std; #define errorMsg1 "You must enter …

Member Avatar for ShawnCplus
0
181
Member Avatar for skitzo315

I'm new to C++ and I can't seem to find the problem with my code. I have a function that opens an input file. It asks you to input a file and if it can’t open the file it asks you if you want to try again. If you answer …

Member Avatar for VernonDozier
0
147
Member Avatar for Liszt

I am trying to set up an emailprogram, the first code that I try to compile is this where I set an emailTo and emailFrom in the arguments of MailMessage. When I compile this code, I have an errormessage that says. [I]'System::Net::Mail::MailMessage' : class does not have a copy-constructor[/I] What …

Member Avatar for Liszt
0
571
Member Avatar for jladd5

Write a program where the user enters numbers (doubles) on standard input. All of these numbers should be greater than zero, except for the last one, which should be -1. The -1 is a sentinel value and is how the user signals that he or she is done entering numbers. …

Member Avatar for Comatose
0
167
Member Avatar for k88joshi

Hello, I am working on something where i need to search and replace many variable names of a program. For example, I have a class [B]Hello [/B]and its public variable is [B]world[/B], but the variable world has been changed to [B]earth[/B] so now in the program i need to go …

Member Avatar for k88joshi
0
338
Member Avatar for Lukezzz

If you want to run 2 loops at the Very same time in C++, will backgroundworkers have this functionality ? An example could be how I have set up it in this code. What I wonder is if the backgroundWorker1 first is executed and when this is finished, then backgroundWorker2 …

Member Avatar for Salem
0
88
Member Avatar for gaspan

To all the Masters, Sir can you help me in this problem, the program tells the infix to convert into postfix. ex. a+b-b*c+g/s =[U]ab+bc*-gs/+[/U] My problem is, once you compile the program there is no error message, but if you run it, the output did not show. I know this …

Member Avatar for Salem
0
163
Member Avatar for ankitk1

Hi, Okay I have problem with my homework. In the code i need to run either object2 or object1. Its a shooting game made in turboc. So if I hit keys a,d or space, i need the tank to move and otherwise i need the object to come down. Thanks

Member Avatar for Salem
0
59
Member Avatar for ozan

Hi I have problem at pointing to the function at the class structure. To demonstrate my problem,I have written a simple code. I have two function. ''Xsquared'' returns square of input value. ''multipleby4'' multiplies by 4 of input value. The pointer to the Xsquared is the input value of the …

Member Avatar for ozan
0
130
Member Avatar for aburich_44

Hello, can an exe statically linked by c++ or code blocks run on a mac? if it requires a software to convert it, which would you suggest? Thank you for any help.

Member Avatar for Nick Evan
0
101
Member Avatar for jladd5

I am just getting started with C++, so please explain things to me in the most basic way you can. I really don't even know where to start to be honest. Below is a problem that I would like to learn how to code. Examples are welcome. Thank you. Suppose …

Member Avatar for Nick Evan
0
101
Member Avatar for odonal01

[code=cplusplus] include <iostream> main () { int a, b; bool found; cout << "Enter two integers: " cin >> a >> b; if a > a*b && 10 < b found = 2 * a > b; else { found = 2 * a < b; if found a = …

Member Avatar for Nick Evan
0
137
Member Avatar for pcongnu

Hi, I'm trying to do a program where I have to input 4 lines of text from a txt file, char by char into 4 seperate arrays (1 for each line). I have this [CODE] ifstream input("c:\\p2input.txt"); for (int z = 0; z < 250; z++) { while (!input.eof()) { …

Member Avatar for galin
0
89
Member Avatar for ozan

Hi, I try to generate uniform random number between 0 and 1. I wrote this code but it creates only numbers at the 0.1***. Generated number always have 0.1 and remaning numbers change, like 0.1234, 0.13444,0.143334.... Can you show me show how can I generate these numbers (uniformly) at (0,1]. …

Member Avatar for Nick Evan
1
91
Member Avatar for meistrizy

Hello and thanks in advance for your help. My program calculates the gratuity of various bills and gives the user how much to leave for a tip. If the user enters a negative amount for the tax, the default constructor is supposed to use 6.5%. My program compiles, but instead …

Member Avatar for meistrizy
0
140
Member Avatar for kim.wilzon
Member Avatar for Ancient Dragon
0
42
Member Avatar for aburich_44

hello i wrote a c++ program, and i wanted to send it to my friends, but everytime i send the exe file to them, they tell me they get the error: "The application has failed to start because the application configuration is incorrect". I tried to put it on rapidshare, …

Member Avatar for mrnutty
0
164
Member Avatar for Phil++

Hey, could I have a little help please. What I'm trying to do is display a message if the user clicks their mouse, I have: [CODE] int main() { mouse_event(MOUSEEVENTF_LEFTDOWN, x, y,0,0); } [/CODE] How would I get it to display a message? I'm thinking an if statement but dunno.. …

Member Avatar for death_oclock
0
494
Member Avatar for mruane

Hi all, my name is Karim, and I am migrating from Python to C++ in order to make windows and linux based games. I am using the Visual C++ IDE, and am a complete newbie when it comes to C/C++. Python is so overly simplified that it does not provide …

Member Avatar for Stefano Mtangoo
0
159
Member Avatar for driebel

Hi, I'm completely new to C++, which I'm doing as part of a numerical methods course. I have experience with IDL, so I clearly like languages with training wheels :) I'm running the GNU C++ compiler under Ubuntu 8.04 on a Dell XPS. I've made my first program run, but …

Member Avatar for driebel
0
107
Member Avatar for Stefano Mtangoo

Hello all, I'm python guy learning C++ so be patience with me. I am just asking if this GUI builder can be used to make Big app like Thunderbird wihtout external assistance [url]http://wxformbuilder.org/[/url]

Member Avatar for Stefano Mtangoo
0
250

The End.