Beginners - October 2010 (Page 26)

Reading a binary file causes the program to crash
 
Hi, My gives me the first lecture when reading a binary file, but then it crashes, i have no idea why whatsoever. Please help #include <iostream> #in...
[2 replies] Last: Thanks Athar, i'll start declaring everything #ifndef CRIMINAL_H... (by claudiordgz)
by Ikaron
Limiting input buffer
 
I'm trying to find a way one can limit the length of the buffer for user input to the console. The reason for this is because I've been putting together a progr...
[2 replies] Last: The reason why I've started with making a console based game is entire... (by Ikaron)
another header problem...
 
Okay, so I have a different problem this time. Now I'm trying to call essentially a random variable from a function in a header in order to determine the value ...
[2 replies] Last: Ah, solved it on my own, forgot #endif at the end of the header. *face... (by vagrantdream)
New to Functions
 
I'm new to functions so I'm not sure where I'm going wrong with this. It's supposed to display all perfect numbers from 1 to 10000, but instead it displays eve...
[12 replies] Last: I get it now thank you. (by nflman124)
by n0de
after (str to f) - only 1 digit after floating point
 
Hi, i'm getting only one digit after floating point after conversion from string to float. Have tryed from standart functions to i don't know.. the problems ...
[no replies]
where can i find a tutorial for creating matrix
 
i need to write a program that will deal with matrices. In particular you should write a function that will prompt the user for a filename, open the file, and r...
[no replies]
Palindrome test program
 
I wrote out a palindrome test program for my c++ class. It is to include 3 functions (one to count the length of the string, one to test if it is a palindrome, ...
[1 reply] : Hello sterlingf5890 :) [quote=sterlingf5890]Visual basic :D Wel... (by coder777)
C++ question about public data member?
 
Lets say that I have the following class: class Car: { private: bool RaceCarStatus; public: Car() { RaceCarStatus = false; } ~Car() { RaceCarStat...
[1 reply] : If it was public there would be no need for the get/set functions. (by guestgulkan)
Having some troubles cleaning things up.
 
#include <iostream> using namespace std; int main() { char word ; //holds word char star ; //holds "*"'s for unsolved letters int count = 0; ...
[6 replies] Last: What i meant is that you forgot to write a escape mechanism when the u... (by Mike Sandy)
Problem With Return Statement
 
Hey guys, I've got a homework assignment here, and it works great, except that I cannot get it to re-initialize. Once it finishes its job it just closes. I'm ...
[1 reply] : Whatever you thought "return" does, it doesn't. Make sure to reread t... (by Athar)
C++ simple question about private and protected in classes?
 
class Vehicle { private: int Age; //The age of the vehicle protected: float Price; //The price of the vehicle In class Vehicle, data member Age is pri...
[1 reply] : Derived classes can access protected members of base classes but not p... (by jsmith)
-858993460 why?
 
Hi there, Can anyone tell me why variables can have printed values of -858993460. I've got a pointer pointing to a memory address which has nothing in it ...
[4 replies] Last: -858993460 == 0xcccccccc in hex. This bit pattern is often used by ... (by jsmith)
Problem with code for beginner
 
Hi all, This is my first C++ course, My assignment is about prompting a user to enter height and character as inputs, and output should be a diamond sha...
[6 replies] Last: Thanks Mike, This set my basics on the setw. (by wreidan)
problem learning header include...
 
I have been following the tutorials on the website and came to the subject of making and including one's own headers. However, when I write the basic addition p...
[4 replies] Last: That fixed it coder777. Should submit that solution to the tutorial au... (by vagrantdream)
Odd or even?
 
Hi everybody, I am making a programme in which I have to check at some point wether a number is odd or even, and then based on the check do something. (In my...
[3 replies] Last: Hey, Yes, I do remember how an if-else block works =). As for th... (by reiniersanders1993)
inverse pyramid and diamond
 
Hello: I'm suppossed to create a triangle, inversed pyramid and a diamond using a "magic word". The magic word is any word that the user decides to input.. I...
[2 replies] Last: Thnx for the reply. (by SweetLen)
'if' and 'else if' trouble
 
Hello, I am working on a project for my C++ class. I don't want a complete step by step instruction of how to accomplish this, but if someone could point me in ...
[4 replies] Last: If you are storing the input in a char you should probably change th... (by MottMan)
trying to write first program
 
So I am very new to writing programs and currently for my first project I am trying to write a program which will give 5 questions which you can select answer's...
[3 replies] Last: The same format would probably be fine but their outcome should probab... (by MottMan)
Problem with getline and class giving weird numbers
 
Hi guys, i am trying to use only C++, therefore I had a problem with getline and int, once I resolved it I started to input the data,the problem is when I run i...
[3 replies] Last: it's included in the #include <sstream> in the header (by claudiordgz)
matrix calculator. no idea where to start, any idea?
 
I'd really appreciate if anyone can help me. I need to create a matrix calculator. The calculator will be able to: * read in matrices (from a file) * perfo...
[1 reply] : What are your problems? (by hamsterman)
October 2010 Pages: 1... 2425262728... 42
  Archived months: [sep2010] [nov2010]

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