General C++ Programming - March 2013 (Page 3)

Calling Base Class Constructors From Derived Class
 
Hey Guys, I'm having some difficulties in understanding the topic which I stated above.Can anyone here provide some good examples and references which will h...
[5 replies] Last: There are two ways. Either you explicitly call a base constructor in m... (by vlad from moscow)
File is not reading properly
 
I have a file which I am unable to read properly. This is binary file so my code is" #include<iostream> #include<fstream> #include<string> using name...
[2 replies] Last: > I am missing few content from the beginning ¿scroll? $ ./a.out | m... (by ne555)
Selection of interesting point from long list efficiently
 
Hi, I have some codes which are not efficient enough in helping me to get the answer faster but I have no idea which part I can modify to simply make it more ef...
[3 replies] Last: See: http://en.wikipedia.org/wiki/Big_O_notation And google for comple... (by tcs)
Does prototype of friend function has no value?
 
http://liveworkspace.org/code/3YEs15$2 Prototype is commented. http://liveworkspace.org/code/3YEs15$3 Prototype is included. both give the correct output....
[2 replies] Last: Friend declaration introduces an unqualified name into the scope where... (by vlad from moscow)
by tomz6
Most efficient way to read a bit from a byte?
 
What is the most efficient way to read a bit at a particular position in a byte?
[3 replies] Last: Here's another option: bool getBit(unsigned char byte, int position)... (by Stewbond)
translate this command.
 
Hello, I need a small help with a funciton that i didn't understand in an exercice it says: if (alp1<=-360 && alp1 >=360) alp1=fmod(alp1,360)*PI/180; what d...
[4 replies] Last: Thank you all for your answer :) problem solved :) exactly buffbill,an... (by universityqd98)
Problems when trying to change values in an array
 
im trying to change the values of my array which is filled first by a constructor now i need to change this values however i cant can someone tell me what i doi...
[no replies]
C++ FOR WINDOWS 7
 
TO ALL THE NETIZENS AND CODERS, Could some one please give me advice/link on a good turbo c++ versions on windows 7(with or without Dosbox).All the versio...
[3 replies] Last: Thanks for the advice guys. It really worked cod::block is awsome (by cyberdude)
help with program
 
I have been working on this for some time. and there is something wrong with the the get_text function. The people who have tried to help me can't figure out wh...
[1 reply] : You need to initialise length before you use it as an index for the te... (by vin)
Constructive criticism for quadratic formula calculator needed.
 
Hello. Please give me constructive criticism about my quadratic formula calculator. I would appreciate any opinions about it. Thank you. #include <io...
[12 replies] Last: Ok, firstly: "But the user doesn't know if two roots are the same. H... (by Gerrit1)
by tomz6
Alternative to MD5 hash?
 
Are there any other good/reliable hashs which are smaller than MD5 and faster? (for purposes of checking for file corruption - not for security purposes) (pref...
[1 reply] : http://en.wikipedia.org/wiki/Cyclic_redundancy_check (by MiiNiPaa)
enum random problem
 
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; void help(); class Dice { public: Dice(); int Roll(); char get(); e...
[1 reply] : Call srand() once at the beginning of your program instead of every ti... (by Zhuge)
strange float array issue .....
 
can any one tell me why my array cpts always contains 0.0,0.0,0.0,0.0,1.0 instead of 0.0,0.25,0.5,0.75,1.0 ? i tried all the possible ways but can't find the s...
[9 replies] Last: Why are you using TurboC++? It would be easier to learn C++ with a mo... (by vin)
by tomz6
How to make a (compiled) code that other programmers can use (cross-platform)?
 
(C++ question) I need to be able make a compiled code (like a .dll?) which other programmers can use on linux, win,, mac, etc. The compiled code would simply...
[1 reply] : There is really no way to do it cross-platform, but you can create .dl... (by J4ke)
Implementation of A* Pathfinding
 
Sorry in advance for this being a long post. I am making (for my degree) a snake game (you know the classic one that you used to have on mobile phones). Howe...
[no replies]
Text game help, how can I make player go back to previous location?
 
Hello, I have started making a text adventure game, I need help with some code. if (Choice == 2) { cout << "" << endl << "You follow the light to the end of ...
[5 replies] Last: Bump. (by smithy311)
using array elements to perform calculations
 
blank
[no replies]
Implementation of Sieve of Eratosthenes Algorithm in C
 
Okay, so this function I created uses the Sieve of Eratosthenes algorithm to compute all the primes <= n. This function stores the prime numbers and the count o...
[no replies]
Prinitng to many times to the screen
 
Hi, got an assignment from varsity. I've got most of the program to work but its printing to the screen 5 times and I only want it to print once. Eg: cos15...
[4 replies] Last: I did do that. Module modules ; then I called it too - modules .set... (by nobodyza)
classes
 
Hey Guys ! i have a question related to classes .. s played using the standard French deck with 52 cards. Each card is from one of the 4 suits, clubs (♣), di...
[6 replies] Last: Why don't you use the counter in you for loops instead of creating a... (by doug4)
March 2013 Pages: 12345... 51
  Archived months: [feb2013] [apr2013]

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