Beginners - October 2015 (Page 55)

Reading data from a text file to an array
 
Student marks are kept in a text file as a single column. Each student may have a different number of assessments and therefore scores. The data recorde...
[1 reply] : (I have no idea where to begin!!!) Textbooks, lecture notes, courses... (by closed account 48T7M4Gy)
return 0; a problem out here!!
 
Please have a look into the code Below... Using Visual Studio 2013. #include"stdafx.h" #include<iostream> #include<conio.h> #include<stdlib.h> #inclu...
[3 replies] Last: @integralfx Many thanks to you!!!! @Peter87 Thanks to make me und... (by Swapnil2000)
help with a foolproof input
 
hello as the title says i need help making a foolproof input for example the output should be like this. Output: enter y or n: sadsadsaas invalid inpu...
[3 replies] Last: the toupper works :D (by MikeLitoris344)
how to copy text from c++ (from not to)
 
how to copy text from c++
[2 replies] Last: Are you using Turbo C? If so, Save your code Go to C:\TurboC\TC\Bin... (by Swapnil2000)
Decimals???
 
How do I make a code display only a certain number of decimal points? For this problem, I would like it to show 3. So if a batter had 2 hits in 10 at bats, they...
[2 replies] Last: and fixed http://www.cplusplus.com/reference/ios/fixed/ (by ne555)
by doon
Asap
 
Write a program that finds prime numbers using an a lgorithm that works as follows. Assume we wish to determine which numbers between 2 and 100 are pr ime. F...
[2 replies] Last: you've got i+2 in line 11, that has no effect, you are simply doing ... (by ne555)
Problem!
 
Okay this has to be one of the simplest programs I've ever written, but for some reason my end result is always 0, unless at_bats and hits are the same number w...
[3 replies] Last: Thank you both so much! (by ianheinze)
by sambos
Working with ranges
 
Hi there, I've been doing a bit of a google search and I'm getting a little confused with how to work an if statement based on a range of values. To put simpl...
[2 replies] Last: Thanks Sasauke! I should have know this..... Appreciate the response! (by sambos)
getting this error LNK2019: unresolved external symbol
 
what did i do wrong?. #include "stdafx.h" #include <iostream> int main() { std::cout << "Hello world!" << std::endl; return 0; } ...
[1 reply] : #include "stdafx.h" Try commenting out this line, should fix it. Th... (by closed account 48T7M4Gy)
Link Lists
 
I have a project to do that uses Link lists and I'm somewhat confused. I think I'm up to the point where I need to call on things in my main so that I can add/d...
[1 reply] : You need to either: 1. Create a new class called "university" which ... (by DyslexicChciken)
adding the sum of a row
 
I am having trouble getting a row to update its accurate sum. I am a true beginner and am trying to follow the manual but the book has nothing about formatting ...
[4 replies] Last: Thanks for the explanation. I figured that is what was happening, but ... (by chrismc1976)
Reading input from console while input redirection
 
Hello. I'm working on a project that uses input redirection to read text from a file. Everything worked fine until I needed to search for a word that user inpu...
[3 replies] Last: then use stdin to read from standar input and a FILE* to read from the... (by ne555)
Operator Overloading
 
I keep getting this error: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'Complex' (or there is no acceptable conversion...
[3 replies] Last: http://en.cppreference.com/w/cpp/io/manip/showpos int re = 5 int im =... (by MiiNiPaa)
reference to non-static member function must be called
 
How can I fix it? Help me! :) myvector myvector :: operator+(const myvector &ref) const { myvector e(ref.size); int i; for (i=0; i<ref.si...
[2 replies] Last: The function size is like this... ref.size() , line 3 and 5... (by Winsu)
by zezimo
Sorting integer inputs by order
 
I have to write a program that takes three integers as input and outputs the integers in order from least to greatest. Here is a sample run as an example: ...
[2 replies] Last: This also works, for an explanation why, see here: http://www.learncp... (by Dazzer)
While loop with if else statements
 
I am having trouble counting the proper number of letters, numbers and other characters in an array. My code is as follows. #include <iostream> using ...
[4 replies] Last: Line 24: This condition can never possibly be true. (s >= 33 && s ... (by AbstractionAnon)
by Dazzer
Destructor in a Class
 
Could someone please take a look at the following code and tell me at which point in the execution of main() does the string "Gonna delete!" get printed to the ...
[3 replies] Last: So it actually happens just before (or at the same time as?!) the las... (by MiiNiPaa)
displaying objects using overloaded constructors
 
Hello everyone, I have created a class called "course". In main, I have created 3 objects called, course course1, course course2, and course course3. Course1 a...
[7 replies] Last: Thanks everyone for your input. This gives me a good idea on how to ta... (by jpanther)
char* input
 
Hi everyone, is there any way to get as an input a chars array, WITH spaces? i have tried cin.getline, but it has problem with the enter keyboard. for exam...
[6 replies] Last: thank you! (by Mor1994)
October 2015 Pages: 1... 5354555657
  Archived months: [sep2015] [nov2015]

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