Beginners - October 2013 (Page 69)

quadratic solver prt 2
 
I wrote this code for the quadratic equation but I want to know how can I use cin.fail() when someone enters an invalid character for a b or c. I don't want the...
[3 replies] Last: If you want (really) safe number input, you should check out cire's ro... (by andywestken)
The art of Polymorphism
 
How do I merge Polymorphism and file streams, I need to print the output onto a file stream, but nothing seems to happen #include <iostream> #include...
[6 replies] Last: if you want it in the command promp also then use cout and myfile str... (by andywestken)
need Help with "assertion Failed"
 
hi! line:39 When I uncomment delete statement my program gives "debug assertion failed" only when using <string> type; line:91 is not usually required but it al...
[2 replies] Last: Thank you MiiNiPaa Problem Solved :) (by youmair)
simple program to know your skill... can you write this?
 
1. Write a program that reads n numbers (n<1000) from the file “sum_input.txt” (attached) and store it in an array. Ask the user to input n using keyb...
[1 reply] : Please note, that this is not a homework site. We won't do your homew... (by MiiNiPaa)
trouble with fstream and polymorphism
 
I'm trying to output the data onto a text file Im using polymorphism(virtual and abstract class) #include <iostream> #include <fstream> using names...
[2 replies] Last: Oh so, it could be a function within a class. Okay now that its settle... (by willynilly)
help with my card game
 
Write your question here. how to write my code shorter by using function. i have tried to use function to reduce the size of my code, so that i don't have to re...
[1 reply] : Your code does not compile. #include <cstdlib> and it is <ctime> no... (by agt)
Passing Arguments
 
Hey guys; I was hoping you guys could explain passing arguments in a good way. I understand how to do it, but I don't understand why I am doing it. If anyone...
[2 replies] Last: This should answer all of your questions about arguments and functions... (by vasilenko93)
by gghf
Need help alphabetizing my string vector!!
 
Hi, I am taking my first C++ class and am doing my 2nd project. Right now I am stuck because I need to alphabetize my vector of type string. I have 10 vectors, ...
[2 replies] Last: Please, take a look here: http://www.allaboutlearningpress.com/how-to... (by condor)
Help with functions
 
Hi I am just learning about functions and I have the general idea of how an array works but How do I do function such as define them and call on them. In this p...
[8 replies] Last: Read the links I provided, they will explain functions really well. ht... (by vasilenko93)
Word Counter
 
Write a program that uses an array of char and a loop to read one word at a time until the word done is entered. The program should then report the number of wo...
[2 replies] Last: oh right lol I forgot that the next question asked to use a string obj... (by Doc 4141)
to create memory locations
 
we create queues using linked lists concept through pointers. Is there any other technique to develop memory instead of above?? which one is more efficien...
[1 reply] : 1) Queue is a container which support insertion on the one side and re... (by MiiNiPaa)
HELP, Stuck on this
 
#include<iostream> #include<stdlib.h> #include<stdio.h> using namespace std; int main() { double g; //generator's nameplates double s; //average wind speed...
[1 reply] : Looks like you have an infinite loop. int i=0; ... while (i==0) Th... (by vasilenko93)
Problem with 2D array
 
Hello all. So I am working on a homework assignment where we are asked: "You are given a 6x8 (6 rows, 8 columns) array of integers , x , already initialize...
[3 replies] Last: always that your inner loop - for(j=0;j<8;j++) - starts,j it's initial... (by eyenrique)
Function to check for negatives
 
I have a main program that asks for several inputs, days, rate, expenses, and purchases. Can I have a function that checks all of these to make sure that the...
[3 replies] Last: Thanks! (by jlpurnell)
swich with if statement not working
 
Hey all, I have a switch that has an if statement in one of the cases. This if statement, if true, is supposed to switch the case... but it doesn't. It will pr...
[4 replies] Last: Thats really good advice. I will use it in the future! Thanks! (by Khillz3000)
Quadratic solver
 
I have this program that gives me a debug error saying that bFail is being ran without being initialized. I ignore it and when I enter 0 as a value of a the pro...
[1 reply] : set bfail to true when you declare it (by closed account Dy7SLyTq)
searcharray pulls number from wrong array
 
The array I'm searching is hand . The value is 11. When the function is called and the result printed, it has found the number in the wrong array. I think my...
[2 replies] Last: What am I doing wrong? I have messed with it more and discovered that... (by Khillz3000)
by ambt
help in menu-driven "introduction to C++ class"
 
Hi there, this is my first class in c++ and I hope I can pass it. i'm stuck in ( menu driven, Loop, and if ) my prgoram is: a store program, whe...
[2 replies] Last: please (by ambt)
median not out putting correct info
 
I know the system pause is not good to use but this is homework. anyone tell me why it never outputs the correct median or cout the correct cout line? ...
[2 replies] Last: You don't actually have to sort the array to find the median, just the... (by xxicemanx)
trouble with printf command
 
What is wrong with this? w = w/1000000; printf("Your windmill generated " %3.1lf " watts today!", w); trying to make it to where only 1 decimal point is sh...
[6 replies] Last: what do you mean by out of place? (by Hedgehog Ninja)
October 2013 Pages: 1... 6768697071... 86
  Archived months: [sep2013] [nov2013]

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