Beginners - May 2013 (Page 52)

reading from file
 
I am having trouble reading from the file. I cannot seem to understand what is going on with it, can anyone help? #include <iostream> #include <iomanip> #i...
[1 reply] : I might be wrong but I believe you are using getline incorrectly. It s... (by GreyOwl)
Overloading >> operator
 
Does anyone know how I would overload the >> operator so I can insert bytes from a inputbyte stream class and have it insert into another class, such as my coun...
[1 reply] : some help would be nice I really have been trying I get weird stream e... (by GreyOwl)
i havent started yet
 
I need something that can teach a person with no knowledge whatsoever on c++. can someone help get me started? please
[3 replies] Last: thank you very much, i'll try them asap (by asianlord)
by QuPii
using a header file with a class in it
 
I cant seem to get the my date header file do anything with the functions i have in my main, here is my header file #ifndef DATE_H #define DATE_H ...
[9 replies] Last: i have such a hard time understanding how to pass info to and from fu... (by giblit)
Line with a line in program
 
What does account1.output(cout); in this program? //DISPLAY 10.7 Alternative BankAccount Class Implementation //Demonstrates an alternative implementati...
[no replies]
Help with while fuction
 
When I run this program the while loop doesn't seem to trigger and the program just stalls, what am I doing wrong? I am using Microsoft visual studio 2012. ...
[3 replies] Last: Thank you guys, the program obviously has other issues but at least i ... (by enternamehere)
Cast a char to int (actual numeric value)
 
Sorry if this topic has been posted a million times over, but I’m having some problems getting a character (that’s a number) into an int. And by that, I wan...
[3 replies] Last: You can also do -48 I believe if you want to save 1 char of typing (by giblit)
Access Write Location Violation ERROR??
 
I am getting a write violation error on this code snippet. If I remove this snippet of code the program works fine but while it is there I get the run time ERRO...
[7 replies] Last: There it is.. Ok thank you all for your help. I am very grateful for ... (by BrianDehn)
by Phiru
new keyword?
 
I am just curious about dynamic alloc and non. For instance, int a ; int *b ; for(int i = 0; i < 10000; i++) { a = i; b = new int(i); } what is ...
[1 reply] : Does line #2 work fine ie: no error? Also dynamically allocating memor... (by Aceix)
by ZFlar
Recursion problem
 
Hello there, Can someone explain to me how the following code will output 55 if 10 is passed as an argument to pineapple? int pineapple(int num) { ...
[1 reply] : This is because, the function is called 11 times when you pass 10 as n... (by Aceix)
Need a little help
 
I would like my if then statements to accept both uppercase letters and lowercase. I know you could just code it in using something like if ((change=='N') && ...
[2 replies] Last: Thanks worked perfectly thanks for the help. (by Dreilly91)
Class and SubClass
 
Hello, I have a class and I want to have a subclass from that. a) How do I code that? b) A class can acess to the private members from the subclass?
[1 reply] : A) class fruit { }; class apple : public fruit { }; B) You... (by blueberry)
Converting Hex to Binary Using In/Output Files
 
Hi guys, I wrote a code a few days ago to prompt the user to enter "Hex" values and the program converts that "hex" value into a 8 digit binary number. I got th...
[1 reply] : You might try reading in more than one token. Chances are it will inv... (by cire)
Operator overloading.
 
Just as some fun I was trying to implement the std::string class. I've not really used operator overloading before but I'm confused about why the following (the...
[1 reply] : your MyString probably has a converting constructor from const char... (by Cubbi)
Creating a game - how to not hardcore it(too much)?
 
Hello, I'm a beginner programmer and would like to prepare for creating a game. I have few ideas, but they don't matter. What matter now is that I need some h...
[5 replies] Last: No problem, glad I to help any way I can. I was just using Pong as a... (by king214)
Help with code!(please help me out)
 
Any help would be greatly appreciated. The program I am trying to write is a program that takes reads from a text file. In the txt file is five names and their ...
[11 replies] Last: If you want to return a double, then indicate that your function retur... (by toum)
Error In code Please Help!!
 
Hi guys, I am learning C++ and found this exercise about doing a "cola machine" ( one of this exercise http://www.cplusplus.com/forum/articles/12974/#msg623...
[7 replies] Last: Duh yeah... that happens thanks a lot! Lesson learn the hard way! n.... (by mariorobles93)
by QuPii
overload constructors and increment/decrementors with classes
 
I'm new to C++, currently taking a class and desperately need help. Here are the programs requirements Design a class called Date. The class should store...
[no replies]
Help with writing a program
 
Write a modular program that determines which of five geographic regions within a major city (north, south, east, west, and central) had the fewest reported aut...
[4 replies] Last: Okay thank you. You have any idea on how I should go about accessing t... (by reedman)
send email with lamp hours every 100 hours
 
Hello, I am trying to write code that will evaluate the value of a projector's lamp hours and send an email with lamp hour value every 100 hours. So far I...
[no replies]
May 2013 Pages: 1... 5051525354... 66
  Archived months: [apr2013] [jun2013]

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