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

Random Numbers
 
I've been writing some code that uses the rand() function and I have been noticing that the average ...
[6 replies] Last: If you're looking for random number between 0 and 1 just calculate r... (by Muckle ewe)
knowing when to do round error correction
 
I'm working with floating point binary numbers with my C++ library called Heap Variable, which can b...
[1 reply] : You should probably read a bit about how floating point numbers are re... (by kbw)
Difference amongst macro NULL an '\0' character
 
Hello! Hope all of you are fine. 1. Can anyone explain to me, what is the difference between NULL ...
[6 replies] Last: http://stackoverflow.com/questions/2759845/why-is-address-zero-used-fo... (by cire)
optimization of this algorithm?
 
void teest(int *prm1, int prm2) { int m, n, tmp, flg; for(m=prm2-1; m>0; --m) { fl...
[10 replies] Last: and, by the way, the first optimisation IS NOT included by your first ... (by viliml)
by aryu
I dont know how to do this.. Anyone please
 
I am trying to make it read: First Name: Last Name: Score 1: " " More? Y Score 2: " " More? N ...
[4 replies] Last: tyty (by aryu)
output and input to/from file?
 
i wanna be able to save certain variables in my program, like levels in a game for instance. the onl...
[6 replies] Last: thanks mate :) (by even821)
iostream equivalent of printf("% N.Me", arg);
 
When using printf to output data, you can use something like below to get the data to line up column...
[2 replies] Last: Took me some time but I figured it out. #include <iostream> #include... (by mmccarty12)
Passing a string to ofstream
 
I have code that developes a string. I intend to pass this string to ofstream for the file name. W...
[4 replies] Last: So for backwards compatability with older compilers use: // Cast... (by Enforcer83)
Need help putting this together.
 
I need help putting my time converter and measurement converter together, i know what to do, simply ...
[7 replies] Last: yea i tried that but for some reason it won't work (by Crimzon)
need help
 
i am teaching my dad c++ and we made a simple calculator. i was trying to get the program to ask the...
[10 replies] Last: dear OP: You should also declare your variables inside of main and gi... (by ceruleus)
by rubix
offsetof; what's /really/ POD?
 
from http://www.cplusplus.com/reference/clibrary/cstddef/offsetof/ : "...non-derived classes with...
[3 replies] Last: Azagaros, I don't think what you suggest is possible: http://codepad.... (by rubix)
C++ to C#
 
What is the easiest way to use C++ code in C# if I am wanting to use C# for a GUI? If it is possible...
[2 replies] Last: I'm aware of that. My program is currently 600+ lines and it seemed a ... (by wbeasley)
deleting base pointer
 
Hi Folks :), I need your help, I am getting segmentation fault for "delete bptr_1" ( please refe...
[4 replies] Last: Line by line analysis of your code: int main() { base *bptr_1 = new... (by clanmjc)
serialize table of objects
 
Hi. I have a question about serialize and desarialize dynamic table of object's. Let's say I have ...
[1 reply] : Consider using formatted i/o instead of unformatted i/o. And a std::v... (by JLBorges)
by viliml
bug in INCREMENT?
 
I made this program: #include <cstdlib> #include <iostream> #include <string> #include <algorit...
[16 replies] Last: Ok, thanks, I got it working now. BTW, this is the whole code: #inclu... (by viliml)
Write wide-characters in a STATIC
 
I am trying to do this and I get some weird results. I create a STATIC control with CreateWindowEx b...
[2 replies] Last: Thanks! (by alexbnc)
Unresolved symbols and other problems (Crypto++)
 
Hi guys, Im, pretty new to programming and I am having a few problems. I am making a windows form...
[4 replies] Last: What do people normally do when using Crypto++ and Windows forms? As t... (by closed account 937X92yv)
New to fstream/argc and argv, is not displaying results ? (Grep program)
 
I'm currently creating a program that will allow a user to look for a word inside of an input file, ...
[1 reply] : because while( !in.eof() ) { getline(in, line); cout << line << en... (by PitDaAnimA)
Reinitialization of iterator in case of vector
 
Hi All, I am using insert operation in vector. After doing first insert operation iterator needs ...
[4 replies] Last: Because vectors shall have one memory block for all its elements as bu... (by vlad from moscow)
Easy GUI
 
I have qt and vs2010 and netbeans. I also have a fully functioning code. The sad thing is I have NO ...
[no replies]
March 2012 Pages: 1... 2223242526... 49
  Archived months: [feb2012] [apr2012]

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