Beginners - February 2014 (Page 6)

HELP!
 
I am a beginner and need help getting the data from the file so i can perform my function to output the answers. I only know how to do the basic stuff so all th...
[5 replies] Last: The assignment is to write a C++ program to analyze a small file of Ch... (by IMNOTGOODATCS)
Console program skipping cin >> ... when two characters are entered?
 
I am making a grade calculator for UCAS points, so I need the user to enter 18 grades for each unit - I've done that and it works. But If the users hasn't done ...
[3 replies] Last: Thanks for the input guys. Understand now. (by SoftMOUNT)
by Huppa
Need help troubleshooting
 
What am I doing wrong that when my studentCounter & totalPassedCounter outputs, there's always one extra? Is that because I initalized number to = 1 to start? H...
[5 replies] Last: Um, I meant that as a genuine question. For all I know, you had a par... (by Huppa)
tictactoe with enums and an array. runs ok but I just can't find this bug
 
This loads and stuff, it just behaves weird. when entering a O or X in cell (y, x) 2, 0 or in 1, 2 it somehow copies to the other. It also does this with cell...
[2 replies] Last: ooooh. Yeah. So obvious now I see it. Yeah, on second inspection ... (by ChrisLewis79)
How to do yes / no question?
 
Im very new here...can anyone shed light? VERY NEW PLEASE UNDERSTAND ;) //random9 #include <iostream> #include <string> int main() { int yes, n...
[6 replies] Last: Yep, return 0 is success and other is false (by closed account EwCjE3v7)
find largest 3 element in array
 
plz tell me how to find first 3 largest element in array in c++ plz answer me and answer should not difficult because i am new in programming plz help me God b...
[2 replies] Last: The obvious solution would be to have 3 variables to store largest val... (by giblit)
by ljm21
Trouble with vectors
 
Hi, I'm a total newb at c++, and I was wondering if I could get any advice on how to find the largest element of a vector argument. I kept reading through the f...
[8 replies] Last: endless amount Another thing to mention is if you have a lot of data... (by giblit)
Comparing two strings problem
 
I am trying to create a palindrome checker using a single stack and pass by reference method.The program is correctly reversing the original string, but the pro...
[6 replies] Last: ok so before this while loop: while(i < phraseLength) { ... (by unsensible)
User defined functions and obtaining prime numbers
 
I am trying to to calculate and display the number of primes between 1 and 1000 using two user defined functions. I have the code to find a prime, and to count ...
[2 replies] Last: Maybe main is not grabbing the proper info that needs to be used. Coul... (by Erinbear)
Conver Decimal to Binary
 
I need your help in HOW TO CONVERT DECIMAL TO BINARY using Dev C++ version 4.9.9.2 . remarks: DO WHILE LOOPING and FOR LOOPING. please need your help. imma new...
[12 replies] Last: and heres the one with bitset(might have some extra zeroes though) : ... (by SorinAlex)
by doc17
Hints to compile as wanted
 
Im suppose to create a program in which i ask user for MPH and time traveled. Hour Distance Traveled 1 80 2 160 3 240 double vs...
[4 replies] Last: thank you unsensible & MiiNiPaa. and thank you for the well detailed e... (by doc17)
Default string value
 
Hi everyone, I am wanting for my object to have a default string value when it is created. In this example, when I create a new Vehicle object, I would like ...
[3 replies] Last: DOH!! Silly me.. I've been playing with the default value for so lon... (by sugarat)
A constant function parameter not working, help!
 
The purpose of this program is to be given 2 strings, and then it looks for string 2 in string one, and returns the pointer of the first occurrence of string 2 ...
[3 replies] Last: It works for me and online compilers: http://ideone.com/crbnQy http://... (by MiiNiPaa)
by dany77
Handling entries in 2d vectors
 
Dear all How to define the proper entries in a 2D (and +D) vector ? This is a simple example. I want sth like this: 1 2 3 4 5 6 7 8 9 I tried with ...
[1 reply] : species = new int[3,3]; is equivalent of species = new int ; spe... (by MiiNiPaa)
Segmentation fault
 
I got the following code: //Prova.cpp # inclue <stdio.h> main(){ char carattere; char num; int n; printf("Inserire un carattere a scelta...
[7 replies] Last: You forgot scanf on your line 12: scanf("%c", &carattere); ... (by MiiNiPaa)
Can you help me please?
 
I have a Car.sln file visual studio 2012 prof. This has Car.h, Stdafx.h, targetver.h as header files. Source files are automobile.cpp, Car.cpp, stdafx. cpp. ...
[5 replies] Last: I use visual c++ and have not recieved such errors. Did you select "Em... (by closed account iAk3T05o)
Constructor Overloading (1,2)
 
Hi Everyone, I'm trying to instantiate an object using constructor overloading, but it is not working. I have the following code: Vehicle.cpp: #includ...
[23 replies] Last: @NT3 - that's spot on, thanks very much. I have implemented the Vehi... (by sugarat)
error:invalid types 'double[int]' for array subscript?
 
i want to ask a user to input 2 values. after that i would like to assign the two values to an array: "Two Numbers" but i keep getting this error:invalid types...
[8 replies] Last: because you also reverse you're printout ordering. if (x>y) { Tw... (by Jaybob66)
by bxrz
Need help writing this program!
 
Im a beginner to C++. Its my first year in college. Im completely stuck at this. Can anyone post a program of how it would look for this problem? Here is a pict...
[2 replies] Last: #include <algorithm> #include <iostream> #include <iterator> #include... (by MiiNiPaa)
too few arguments to function in 'function()'
 
this is my function declaration int boygroups(int ans); and this is my function definition int boygroups(int ans) { ...
[5 replies] Last: boygroups(); <-- i call it like this, and then i have a value to r... (by MikeyBoy)
February 2014 Pages: 1... 45678... 60
  Archived months: [jan2014] [mar2014]

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