Beginners - January 2016 (Page 21)

Reading from a file
 
I wanted to know if it's possible to somehow determine if the line ends if im using something like fin >> something? Like in the code bellow, if the input file ...
[1 reply] : Something like this? #include <fstream> #include <sstream> #include... (by mpark4656)
Point counting program
 
I am trying to make a program which asks how many points each player gets and then outputs the total score, but each time after new points are written i have to...
[2 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ (by DeathLeap)
Help with a for loops problem
 
What am i doing wrong? I am trying to make a pattern like this where the user enters a height and a width for the design. ******* *0*0*0* *0*0*0* ******* ...
[4 replies] Last: THANK YOU!!!!!! :) (by deadlybluecow26)
by Mays
'{' : missing function header
 
Compiler complains that '{' is missing function header when it jumps to function Sorting. But I included it in the header, or am I missing something? #inclu...
[8 replies] Last: Sorting(numbers, n); (by cire)
by shaven
why the answer is 3??
 
What is the value of x after the following statements? int x, y, z; y = 10; z = 3; x = 3 + y * z; output=====33 What is the value of x after the ...
[5 replies] Last: 15 / 4 = (3 * 4) + 3 4 divides 15 evenly 3 times. 3 times 4 equals 1... (by elaleph)
Help with program
 
Hello, I'm trying to create a program that will do the following: The user puts in however many integers he or she wants. When the user presses enter, th...
[5 replies] Last: @cire Nice. Thanks for that idea. Using getline () and string stream w... (by mpark4656)
More pointer help -_-
 
All of these pointers are starting to confuse me. I am supposed to convert this code from passing by reference to passing by value and pointers. Alright the pro...
[3 replies] Last: I posted the original code I am converting at the very bottom The on... (by cire)
C++ resources question
 
Hello, I am Learning C++ and I would like to know if the C++ Language Tutorial Written by Juan SouliƩ is still a usable book to teach your self the language. ...
[5 replies] Last: bjarne stroustrup (creator of c++) Wrote a book called a tour of c++. ... (by TarikNeaj)
Can c++ save images to my HD or c++ code can't touch such?
 
Maybe c++ is limited, can c++ code be made that will save images to disk or affect other programs? Or is it self contained to its we little self and can only ma...
[8 replies] Last: Search-Tree would beat Google-fu though*** Can't I set the above oper... (by ADVANCESSSS)
Passing by pointer, cannot convert argument 1 from int* to int
 
I cannot get passing by pointer to work in visual studio. Here is a simple example. Somebody tell me what I am doing wrong. I get the error "cannot convert argu...
[3 replies] Last: ....I am so stupid. Thanks (by prodigydeadeye)
Using Pointers to Create Multidimensional Arrays
 
I've been trying to increase my understanding of pointers by doing examples using multidimensional arrays. Mentally, I have been trying to visualize multidimens...
[1 reply] : Ok, understand that in conceptual grids, what's "width" and what's "he... (by Austin J)
Error when trying to run code.
 
Hi! When I try to run this code, I get an error: "No match for 'operator <<' in fileout << studentID' " string temp; while(getline(in, temp)...
[2 replies] Last: What kind of object is studentID? The compiler does not know what to d... (by Moschops)
by noaboa
Sudoku game
 
Hi, I am making a sudoku game and have hit a problem. I have made a function that adds random numbers and check if it's possible (if that number already is ther...
[3 replies] Last: As Peter87 said I am talking about the boardNumbers() funciton. The pu... (by noaboa)
by ay2306
TurboC++ 4.5 problem
 
I am trying to use function delay() from dos.h and Sleep() from windows.h but it does not recognize any... what to use???
[no replies]
Vector, eating contest.
 
Hi, I am creating a small program that allows for the user to enter an amount of people to enter an eating contest, followed by the amount of pancakes eaten by ...
[4 replies] Last: Also any bad things I do in the code, please also mention To get the... (by dhayden)
Recursion with for loop
 
I was given a task to find the biggest number by this formula: number = (smallest_number / sum_of numbers) * 100 The difficulty is that the amount of numbers us...
[7 replies] Last: dhayden mentioned combinations and a minimum value, forgive me for be... (by dhayden)
lottery simulator
 
Chaps I have written a lottery simulator ( I think ), but I can't help thinking that my logic is not correct on the conditional statement. Basically int main()...
[1 reply] : I apologize for the quality of the code - I am very new to C++, if any... (by jamesfarrow)
Creating a function forcalculating
 
I have a code witch saves some data, can some one make a function which calculates the total points of var test + driving1 + driving2 and saves them in the text...
[2 replies] Last: You could change line 196 so the first item written to outKursistFile ... (by Chervil)
Pacman issue
 
I'm currently making a copy of the pacman game through Visual Studio for a university assignment. I tried to debug it earlier and it gave me this error "this->...
[2 replies] Last: Would that be this? #pragma once // If Windows and not in Debug, thi... (by LordxDanswich)
by alitt
using for loops in class
 
hi guys i wrote these code,it gets 2 numbers and calculate with class and im gonna have more numbers not just 2 numbers,where should i write for loop? #...
[no replies]
January 2016 Pages: 1... 1920212223... 29
  Archived months: [dec2015] [feb2016]

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