General C++ Programming - March 2012 (Page 45)

by vixiet
File size on huge files
 
I have a customer's file that is very nearly 4gb. I have a C++ program I'm using on it and the first thing it has to do is find the total bytes in the file. I u...
[1 reply] : > the first thing it has to do is find the total bytes in the file > I... (by JLBorges)
Need Help Calculating Pi and the percent error
 
My program keeps repeating an out put for each increment of N. I don't know what's going on. Can anyone help? #include<cmath> #include<fstream> #include...
[4 replies] Last: If error estimation is required, you would need to use a Maclaurin ser... (by JLBorges)
"Stack smashing detected" -- Cannot functionalize a chunk of code
 
Hi all. I'm working on a pretty large project. Everything's going well except that I'm having a very strange problem trying to put a chunk of code into a sepa...
[7 replies] Last: > What I don't understand now is how I was getting away with everythin... (by JLBorges)
Visual C++ issue
 
I recently upgraded my OS and my HDD, and with it decided to install Microsoft's Visual C++ 2010, and I recently compiled the SFML 2.0 snapshot since it probabl...
[no replies]
Please help. My grades/rest of life depends on it!
 
Please help! i am making a deck class that has to be able to print the current deck, draw a card, and shuffle the deck. I really need help with the shuffling po...
[3 replies] Last: Download and read How to Think like a Computer Scientist CPP edition. (by vin)
Calculating Pi Problems
 
I'm having trouble with this approximation of pi. Instead of it approaching 3.14 it is increasing by 3. Can anyone help? #include<cmath> #include<fstream...
[1 reply] : I looked at your code closer. I cleaned it up a bit, mostly got rid of... (by vixiet)
HELP ASAP!
 
i dont know how to do this, can anyone help? Write a C++ program that finds the smallest divisor of a number or determines if that number is a prime number. Th...
[8 replies] Last: @LB wait, it should be a function, -_- (by iamjoelgallego)
creating a Wind chill factor using function passed by value
 
in a cold weather, meteorologist report an index called the wind chill factor, which takes into account the wind and the temperature. the index provides a measu...
[1 reply] : http://www.cplusplus.com/articles/DjGEy60M/ ... (by LB)
by LB
Reconstruct a stack variable?
 
MyClass mc (/*...*/); //... mc.~MyClass(); new (&mc) MyClass(/*...*/); //... I know it is a design flaw to have to do this, but is it safe?...
[1 reply] : Yes, provided the constructor doesn't throw. (by Athar)
Testing the equality operator
 
Hi, I am learning C++ for the first time and I am having a small problem that is keeping me from moving ahead in the book. In Python whenever I am testing out...
[11 replies] Last: It must be my IDE... the result is still the same. Thanks for the hel... (by F1LewisH)
HARD CAHLLENGE
 
I created this PDF for my students. If you would like to give me feedback on it that would be great also if you want me to check your code then please e-mail it...
[5 replies] Last: Perhaps we should reverse the game? The protagonist is the pirate, tr... (by roberts)
by rucafe
compiling c program with visual studio
 
I am trying to compile a program written in C on visual studio c++ 2010. I created a new project and placed all the .c files and h files into a new project. As ...
[3 replies] Last: MS VC++ 2010 does support the C99 Standard. This means that all variab... (by vlad from moscow)
Objects
 
Hi guys, I need some help with the following program: Objects of the Currency class require a name (string), a currency symbol (string) and the number of de...
[2 replies] Last: They just want the code not the classes. (by louflow)
Variable resetting at end of while() iteration for no apparent reason
 
I am declaring an int with bigger scope than a problematic while() loop. At the end of each single iteration of the while() loop, that variable seems to get re...
[2 replies] Last: Holy cow. Needless to say, I feel pretty stupid. It's amazing how yo... (by Caleb9849)
how do you convert binary to integer?
 
for example 101010
[4 replies] Last: A quick tut: Take the decimal integer: 104 This can be mathematical... (by roberts)
GMP with Large Integers
 
I have a program that factors very large integers. I need to use GMP since these integers easily overflow even the long long unsigned int type on a 64-bit machi...
[5 replies] Last: Thanks. I didn't find those pages on initializing and assigning intege... (by joatmon)
Everyday programs on SFML?
 
Lately i've been reading a lot of articles on this website and notcied an interesting one saying you should move away from the console as fast as possible. I ju...
[1 reply] : Yes you can. The initial setup is somewhat more complicated though. (by hanst99)
C++ console RPG save/load game functions
 
Hello all, First I'd like to say that yes, there may be better/easier ways to make a game and better types of games to make for a beginner, however I am on m...
[6 replies] Last: I was wrong about the c_str. That gives you a const char *, you can't... (by Caleb9849)
*
 
*
[3 replies] Last: http://cplusplus.com/forum/general/63344/ If you're going to try to g... (by cnoeval)
find something with a keyword(fast plz)
 
i wanna read a file .txt and show wich lines have the word searched for what should i add to my program? #include <iostream> #include <fstream> #include <os...
[1 reply] : You might find string member functions like "find" useful, they can be... (by Caleb9849)
March 2012 Pages: 1... 4344454647... 49
  Archived months: [feb2012] [apr2012]

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