Beginners - August 2009 (Page 14)

by wretch
operator+ cannot take ref parameter?
 
#include <iostream> using namespace std; class Rational { public: Rational(const int n=0, const int d=1) : numer(n), denom(d) { printf("ctor bef...
[4 replies] Last: Thanks Duoas and thanks Disch . BTW Disch the reason I was usi... (by wretch)
Problems with "switch"
 
Ok, so a few days ago I wrote a calculator with the if-else-if ladder, and decided to edit it to use switch, but it's not working. It always defaults to "Invali...
[3 replies] Last: you could then change the 1,2,3,4 to *,+,-,/ to make it easier/more us... (by mrHappyPants)
do loop
 
how can i make this do loop into a while or for loop? do{ cout << "How likely is the virus to spread to a neighbor (0-1) ? "; cin >> pr...
[3 replies] Last: it looks OK at first sight (actually you don't need to duplicate cin ... (by johnkravetzki)
by arash
Variable used without being initialized Error
 
Hi everybody, I am a beginner in C .I see this error many times when I write even little simple programs where I dont initialize the variables : Run-time ch...
[8 replies] Last: thanks for detailed replies. I think const char* crash = 12; ... (by arash)
Temperature function
 
I am needing some help creating a temperature table for my c++ class. Can anyone provide me with some help or an example thatll show me how to do this?
[2 replies] Last: We have to create a table that will convert from celcius to farehnheit... (by shankman2k9)
by Kuzco
Warnings
 
Hello, I'm new to C++ and I would like if someone could tell me what warnings in Visual Studio 2008 are and why I should care? :) I get alot of these: warni...
[5 replies] Last: Thanks for the answers, Bazzy :) (by Kuzco)
how to display
 
How can I make an output like this: 54321 _4321 __321 ___21 ____1 __ are spaces I have started this codes.. but can't make it the output like that. ...
[19 replies] Last: @webJose Thanks, but I can't understand the code.. Sorry, I'm just... (by jhaysonn)
by Kuzco
Merging variables
 
Hi there. I would like to know if it is possible to merge variables so that if I have 2 variables, a third variable would be variable 1 and 2. Here is an exa...
[2 replies] Last: What I want is exacly what you explained, Thank you :) (by Kuzco)
Creating a file, comparing answer sheet with student data.
 
#include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv ) { ifstream student_answer; i...
[1 reply] : Are you running the program from a different directory as the one that... (by kbw)
by Kuzco
What is wrong with my calculator? :)
 
Hi there. I'm pretty new to C++ and need some help. I'm attempting to create a calculator but I get 12 errors when I compile it. So could anyone tell me what's ...
[6 replies] Last: Thank you Bazzy :) (by Kuzco)
Converting an int into a char[]?
 
I'm using a function that outputs text on the screen, but only accepts a const char*. So I made a function that would take each digit and put it into a char (ca...
[8 replies] Last: Ah thanks, but i found the function sprintf() , and it worked fine.... (by FireFreek)
Uninstalling my software
 
Hi everybody, I'm new to C++ but i made a program that counts how meny times i reboot my computer. Pritty simple but fun. Now i want to make an uninstaller ...
[2 replies] Last: PROBLEM SOLVED Yee, Thanx i'v read something about reg-keys. ANd fo... (by matthijs)
Console closing before the end of int_main
 
Hello Folks! I just started out with C++, but when I was trying a little, I stumbled across a problem. // Unnamed.cpp : Defines the entry point for the ...
[4 replies] Last: I already re-wrote the whole code ^^. But still the strange thing is, ... (by Sanguine)
structure for mailing list
 
Hi, i am now learning how to use structure in c++ and build one for a mailing list. But it does not work and i cannot figure out why. My code is: #includ...
[3 replies] Last: thanks a lot!!! (by jelongch)
by bing19
looping
 
how to create a program in turbo c++ that the output would be an asterisks running in the 4 sides of the screen?
[1 reply] : you mean something like this? * * * * * * ... (by johnkravetzki)
Why can't I overload functions from a base class?
 
enum eTestB{ B }; class UseA{ public: void Testing( float Type ){} }; class UseB : public UseA{ public: void Testing( eTestB Type ){} }; void ...
[4 replies] Last: By the way - that FAQ you found is really good - I use it quite often... (by guestgulkan)
by SJK
Program : convert decimal number to binary
 
Pls. help me to write a program to convert a decimal number to its equivalent binary number. BINARY OF 11 IS 1011 BUT I GOT IT IN REVERSE ORDER ie:1101 How ca...
[5 replies] Last: THANK YOU Sir the code is working. But I didn't got the use of cin.s... (by SJK)
by MiaZas
vector.size() not working
 
Ok, I am ALMOST finished with this inventory but one last little thing is giving me problems: On line 49 I am attempting to show the number of items in my inven...
[7 replies] Last: First off, starting at line 1: the <cstdlib> file is only needed for t... (by Duthomhas)
Decrypt file using original unecrypted file
 
Hi guys I'm new to all of this and was needing the help of some one that knows what they where doing... I have the Encrypted File and the original file befor...
[6 replies] Last: I have a question ... could some one explain this for me.. <LIMITS>... (by Shadow Walker)
by MiaZas
Array Elements
 
I am trying to write a program for an inventory. Each item needs to have a name and a number associated with it. I have no idea about how to go about creating t...
[9 replies] Last: thanks mate (by blackjedi)
August 2009 Pages: 1... 121314151617
  Archived months: [jul2009] [sep2009]

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