49,757 Topics

Member Avatar for
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
586
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
180
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
570
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
312
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
128
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
100
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
489
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
Member Avatar for winrawr

how would I go about making a variable in a class, that could be read directly but not written as such? Like, [icode]if(class1.variable==true){ }[/icode] is allowed but [icode]class1.variable = true;[/icode] is not... however I don't want a [icode]const[/icode], I want it to be able to be set from within the …

Member Avatar for winrawr
0
154
Member Avatar for hahanottelling

[CODE]TCHAR exepath[MAX_PATH]; GetModuleFileName(0, exepath, MAX_PATH); HKEY hKey; LONG lnRes = RegOpenKeyEx( HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0,KEY_WRITE, &hKey ); if( ERROR_SUCCESS == lnRes ) { lnRes = RegSetValueEx(hKey, "YourProgramsName", 0, REG_SZ, exepath, strlen(exepath)); }[/CODE] To add as a HKLM (For all users) startup item instead of HKCU (Current User), change HKEY_CURRENT_USER to HKEY_LOCAL_MACHINE. …

Member Avatar for cikara21
0
117
Member Avatar for shasha821110

Hi, all i have the assignment about program which reads in integers from cin until the user enters a non-integer (a character or EOF), then print out the average. Its pretty simple assignment but i am kind of new. So the following is my code and seems like have some …

Member Avatar for soroushc
0
156
Member Avatar for neoseeker191

For some reason my if statement in both my [I]unionFunction[/I] and [I]intersectFunction[/I] is setting the array equal to 1 rather then comparing it. I've tried to figure out whats wrong but nothing seems wrong to me. I appreciate any help. Here is my program so far: [code] #include "stdafx.h" #include …

Member Avatar for soroushc
0
133

The End.