Beginners - November 2012 (Page 70)

If statement not working
 
Hello guys I am a little bit confused on if statements. I am creating a simple program that sorts numbers in descending order, and I have it so that it outpu...
[1 reply] : check your assignment versus equality operator. (by pogrady)
by dkjdod
Help with reading from file.
 
I need to make a function continue to read 3 pieces of data from the file each loop until it gets to the end of the file. How would I go about creating such a l...
[1 reply] : std::ifstream infile( datafile ) ; double a, b, c ; while( infile >> ... (by JLBorges)
error in code--need help fixing
 
Here's my code and the error I'm getting: 1 #include<iostream> 2 #include "Weapon.h" 3 using namespace std; 4 5 class Knight { 6 public: ...
[1 reply] : get_stamina_required WHat is that? Is it an int? A double? A char? ... (by Moschops)
by WhiteG
Opening websites
 
I want to make a program that opens one link (ex.www.yahoo.com) then waits 1 min and then opens a different link. I need it to open more than 100 links. Can you...
[2 replies] Last: open an url then open another one after 1 min (by WhiteG)
Number of Days since you were born
 
Hi guys!! Happy Halloween, am still struggling with some C++ problems. How can one Create a function whose input is an integer n which represents the number o...
[6 replies] Last: tHANKS (by princesslumy)
by Vy C
This else if not working
 
Hello all, I have to convert y and z to a and b. Same with the uppercase values. My code doesn't seem to be working: else if(((value == 'y') &&(value ==...
[3 replies] Last: Just make the operators all ||. else if(value == 'y' || value == '... (by AbstractionAnon)
else/ if statements help
 
assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter ...
[3 replies] Last: Thank you Stewbond! i know the question was trivial but the if els... (by s123456)
Looking for Help: fstream objects, .getline(), and strings
 
Hi guys, I'm having a bit of an issue. I'll just show you my code. const string EQUAL40 = string(40, '='); fstream inFile; inFile.open("filename"); st...
[4 replies] Last: Both fstream and iostream are included. Sorry, I should have been mo... (by kuriolis)
Need help - map elements
 
I can't seem to find why my code doesn't compile. If someone can take a look at it and help me correct my mistakes, that would be much appreciated. The goal is ...
[3 replies] Last: Alright thanks that solved my problem. (by foodyore)
My code cannot read what's in the file
 
When I open the file in my code, it does not seem to be able to read anything that's in it. I used fstream inputfile then inputfile.open(file). The file seems ...
[no replies]
how are ADTs useful?
 
I am a total beginner at C++ and I recently came across ADTs in polymorphism. Now, to professional programmers, this might sound like a stupid question, but her...
[2 replies] Last: ohhh so it makes things easier? (by MinwooJu)
Reading data from a text file into arrays
 
The program I'm working on is reading the data from a text file, and is supposed to read them into two separate arrays based off of what kind of information it ...
[no replies]
by noo1
Calculate Stock Value using an inline function
 
I am soooo lost. Please help me. I have to write a program which uses an inline function calculateStockValue. the function takes two parameters - one is a nu...
[6 replies] Last: Thank you both so very much!!! (by noo1)
by skarla
i need someone.
 
wHO can teach me hooks and can help me to make a keylloger.
[1 reply] : Dalai Lama can. (by hekri)
Sequential file data to function
 
I need to read an external sequential file then use that data in a functions that will calculate taxes, dues, etc. The data will be outputted to a new external ...
[no replies]
reading data into a vector
 
So im having a bit of trouble figuring out the second part of this code. This first part just creates a txt file and populates it. BTW this code was provided, i...
[1 reply] : You aren't using a std::vector, just a dynamic array. http://www.cp... (by Lowest0ne)
How to make Value Returning function
 
I keep getting an error that says "lowest is being used without being initialized". I understand what it means. The lowest variable has no value in the GetLea...
[8 replies] Last: I just figured it out. I never actually opened the file in the functi... (by Reynolds773)
difference between math and math.h
 
What is the difference between math and math.h. I check some compilers use and .h extension and others don't. How do we know when to use what?
[1 reply] : math.h is a C header. math is something I've never heard of in th... (by Moschops)
Calculating Standard Deviation
 
I'm having a problem calculating the standard deviation of an array. I'm using numbers 1,2,3,4,5 to check the code and the standard deviation should be 1.58,...
[3 replies] Last: What is the point of arrayDev being an array? It seems like you could... (by freddy92)
Problem with nested do while loop.
 
Okay, so the premise is a shopping program with three different calculators in it. Im having a problem with calling and using the menu function, no matter wh...
[1 reply] : You declared the char option twice. Once on line 16 and once in the me... (by Raezzor)
November 2012 Pages: 1... 6869707172... 75
  Archived months: [oct2012] [dec2012]

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