General C++ Programming - June 2012 (Page 17)

by gws923
Modifying (adding to) an inherited function.
 
Hi all, I think this should be a fairly simple problem, but I have been staring at my screen for half an hour trying to figure out what's wrong and nothing is ...
[6 replies] Last: No problem. Glad I could help. :-) (by MrHutch)
by Nonlin
Why does this work with 10 but not 1000?
 
Attempting to solve this problem http://wiki.answers.com/Q/What_is_the_sum_of_all_the_multiples_of_3_or_5_below_1000 I tried to come up with a simple C++ pro...
[5 replies] Last: I want to illustrate how using math can reduce programming and increas... (by eklavya sharma 2)
Question about the process of creating a class - Inheritence (1,2)
 
Hello, When creating a derived class, there are new steps that must be taken then with just a normal class. First, before the derived class's constructor is c...
[26 replies] Last: Yes. Since ObjectB 's trivial default constructor (the constructor th... (by closed account zb0S216C)
C++ code to open another already open program
 
Hello, I am currently working on a program that will take data from a txt file, and fill in some information in another program. My code reads the data in the...
[9 replies] Last: EDITED... (by iantac)
How to pass character arrays as parameters to a Thread^
 
Hi, I'm using C++ and I want to start a thread calling a function (extractVoice) that has char* as two parameters. Below is my code: Thread^ extractVoiceT...
[2 replies] Last: This is not the right forum to post your C++/CLI and .NET questions, t... (by modoran)
Problem with list (STL)
 
I have been trying to manipulate data which has been stored as list of objects in a separate class but since I dont have very solid concepts in STL I am failing...
[10 replies] Last: Init list! Of course, duh. Cheers, ne555. (by MrHutch)
logical operators
 
int x,y,z; x=y=z=1; ++x||++y&&++z; cout<<x<<y<<z;--->x=2,y=1,z=1 i have tried this puzzle in gcc compiler. I didn't get idea behind this expression.coul...
[4 replies] Last: ya thank you... now i got clear idea about these precedence because th... (by parthiban)
Question about the Segmentation fault in my program
 
I want to print out the binary search tree like a tree graph. After running my program, I got segmentation fault. Please help me check if or not the code has so...
[2 replies] Last: you get a segmentation fault becouse noone of the functions in the man... (by viliml)
by Nanne
Iterate through a struct
 
Hi, I'm trying to iterate through a struct which is passed to a function. The struct is dynamic and can have any number of members / elements of any data ty...
[13 replies] Last: I can try it myself to check it before I make use of boost::any (by Nanne)
decimal multiplication?
 
i'm trying to write a program that takes information about a vehicle's engine, such as inch displacement, max rpm, and volumetric efficiency, and output the eng...
[4 replies] Last: thanks guys! setting the output to fixed definitely solved my problems... (by mseaton)
Publishing c++ programs
 
I have made some c++ programs in the past and I would like to share them publicly. Is there any way to do this, like possibly through a website? Thanks.
[13 replies] Last: You only need to recompile it with a compiler for Windows, you don't n... (by Athar)
by Screed
C++ Icon
 
How do I change the icon of a C++ project I made? Don't give me solutions that involve Visual Studio please, as I use Code::Blocks.
[2 replies] Last: thanks :D [EDIT::] For some reason i dont understand what to do, when... (by Screed)
Help making a function
 
Hi, I want to move a large chunk from main to a different CPP file, and I literally have been trying to do this for hours with no luck. File1 (with main) http:...
[3 replies] Last: Um...ok. Make a new method (name it for whatever that code does). Cut... (by Zhuge)
How can I get rid of a console scrollbar?
 
How does one rid of the scroll bar so previous information can not be reviewed? I would like to work with this some for neatness purposes. I was told that the f...
[1 reply] : A bit of Googling gives me that to avoid scroll bars you need to set t... (by Zhuge)
Weird technical issue
 
So I have this code, it converts (supposedly) a million chars into shorts with file streaming, but it always crashes after 77 thousand (roughly) What's wrong w...
[9 replies] Last: I downloaded the file you posted and tested on my system. Strangely t... (by SIK)
by rucafe
initializing very large number
 
I am trying to initialize a very large number and then pass it to a function: int iteration = 2000000000; void function(iteration); My program t...
[8 replies] Last: How in the hell does your code compile? Your secondary class is missin... (by sargon94)
by rucafe
enable just my code
 
In Microsoft Visual C++ Express 2010, how can I enable just my code so that when I encounter an exception, the debugger will not stop on the built-in c++ functi...
[2 replies] Last: Great thanks a lot! I'll give that a try.... (by rucafe)
by dont
NAN vs. -NAN
 
The following code (on gcc 4.4.5) #include <cstdio> #include <cmath> int main ( int argc, const char* argv ) { const float inf =1.0f/0.0f; printf("%4...
[2 replies] Last: First of all, keep in mind nans don't have signs. The meaning of the m... (by Cubbi)
Finding two highest numbers.
 
I'm trying to figure out the two highest numbers of an array. Without sorting them and only using one loop. I know how to find the highest, but then how do ...
[1 reply] : It is very simple. All that you need is to write the corresponding al... (by vlad from moscow)
giving length to array by user?
 
Is there any other way (except link-list) to give length of array as a input by user?
[6 replies] Last: ok.thanks i will.. study about vectors.. (by atif1512)
June 2012 Pages: 1... 1516171819... 33
  Archived months: [may2012] [jul2012]

This is an archived page. To post a new message, go to the current page.