Beginners - August 2012 (Page 40)

Type casting
 
Hello everyone I've created this small example so I could explain you easier what my problem is.Here's the code -> #include <iostream> using namespace std; t...
[1 reply] : You've got some C-style struct use going on here which is bad form. Le... (by Moschops)
by dancks
function reads true regardless???
 
checkexplode reads true even if nothing is found. collisionhandler::checkexplode searches through vector of player objects, searching for next character that is...
[6 replies] Last: The code as it stands, technically works. But collisionhandler::checke... (by dancks)
by ozza
Is it safe to bury files in System32?
 
I'm working on a password protection system, in which the password is encrypted then stored in a text file (password.txt etc). Is it safe to store this txt file...
[5 replies] Last: I think burying the file is far less important than the encryption. Bu... (by andywestken)
HELP with problem please!!!
 
I want to write a program the uses a while loop to get integers from a user. then using nested for loops, creates a square of the number using asterisks. when ...
[2 replies] Last: here is a small hint to help you. on the first and last line it are al... (by gelatine)
by krok
datatype size
 
Hello, I am new to c++ but have a lot of programming experience in Java. In c++ the size of int can be variable depending on the compiler and library. It has...
[10 replies] Last: thanks for your help kbw. I had started a new thread, so I didn't hij... (by TheIdeasMan)
Returning an Array using pointers
 
Hi all, First and foremost, thank you for your help in advance. Basically, I am trying to return an array of strings in a function I wrote. I figured out ...
[11 replies] Last: The main purpose of const is to specify your intent. If a parameter is... (by KRAkatau)
quick question, please help.!
 
Hello, I know this is just a short question, unfortunately I couldn't install netbeans at home, so I couldn't try it. Can anyone help me with this, please. ...
[2 replies] Last: thank you so much :) (by monkey1604)
getting current time
 
time_t currentTime; struct tm * ptm = localtime(&currentTime); std::cout << ptm->tm_hour << ":" << ptm->tm_min << ":" << ptm->tm_sec << std::endl...
[1 reply] : I think you need to initialize currentTime first using the time() func... (by Zhuge)
Problem with nested loop
 
I just learned nested loop. And I understand only a little bit about it. So I try do some exercises. At the end I couldn't get the output below: Experiment ...
[2 replies] Last: I see. I will try fix the inner loop. Thanks for your advices (by Nur Zafri)
String length check in argument at compile time
 
Hi, Just can't figure this out despite having spent hours reading about pointer etc. Is it possible to pass a char* to a function and have the length checked...
[no replies]
Help with my doubly linked list
 
My code so far: template<class T> class list { private: struct node { T value; node *next; node *prev; ...
[17 replies] Last: I'm incredibly happy. It took me about 20 minutes or so to track down ... (by Volatile Pulse)
by jaded7
enum types
 
Hi, huge beginner question here, what exactly is the "y2k" bit at the end used for? This was taken from another page on this website. enum months_t { janua...
[4 replies] Last: Thanks for the quick help. (by jaded7)
by ozza
Runtime Error
 
Hi I'm new to C++ and working on a password protection program, I found the basic framework for a username/password online, and I edited it to encrypt the pass...
[10 replies] Last: Once again, solved. Just removed the entire else if(!isprint(c)){ ... (by ozza)
How can I find the largest number in loops? (1,2,3)
 
I'm making a program that determines the largest number from the 10 loops. How can I make it determine the largest from the 10 loops. Here's the program I'm doi...
[43 replies] Last: @ Volatile: I'm no kid.... Well I'm a teenager.... Most of your post h... (by DetectiveRawr)
Blackjack Game help
 
I need a lot of help on this one. This is my last assignment and I am having some trouble with it. I need to write a blackjack game that has this •All car...
[8 replies] Last: The reason it is printing 00 is because you are printing the face valu... (by Hippogriff)
stumped about getline
 
Hello everyone. So I'm having a slight problem at line 128. I call a set function to try and set the name of the first player but for some reason the funct...
[7 replies] Last: cin.clear() never clears the buffer. All it does it clear any errors t... (by firedraco)
array jibberish
 
So everyone knows when you try to print something in an array that doesnt belong, the screen prints out weird stuff. I made a program that takes a file, fills a...
[3 replies] Last: Greatly appreciate your help, the both of you! Program works efficient... (by algoRichard)
Modifiable expression error?!
 
the count of the if statement says that "expression must be modifiable"...what does that mean? my format appears to be correct...obviously it is not though! Ple...
[6 replies] Last: Because of what was stated before, you need to remove the semicolo, ';... (by Volatile Pulse)
If problem
 
I am writing a cylinder calculator to determine volume and surface area, but I am getting a problem with an if statement. /* Cylinder calculation program ...
[3 replies] Last: What about the call to main(). Very bad news. The if in function end... (by TheIdeasMan)
While loop broken?
 
So when i activate the loop it sprays out a non ending list of 1's it should print n1 to n2 but its not... . #include <iostream> using namespace std; ...
[2 replies] Last: Oh... how embarassing.... (by ryanvkeller)
August 2012 Pages: 1... 3839404142... 45
  Archived months: [jul2012] [sep2012]

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