Beginners - March 2014 (Page 57)

by oajfh
getline() reading whole .txt file
 
Greetings, I am currently making a small console game to get to grips with the basics of the basics in C++ and have encountered the following issue : I'm creat...
[8 replies] Last: All right, problem solved. Sorry, that was a dumb mistake >< Yeah, I n... (by oajfh)
Tree recursion.
 
Suppose there is a 2d matrix n by n such that majority of the ints inside the matrix is 0 while the leftovers are 1s. E.G 10 by 10, with 20 randomly placed 1s ...
[1 reply] : Option 1: Do not allow 'left', 'up'. Option 2: Keep track of nodes th... (by keskiverto)
Draw a bmp with arrays pixels in C++
 
Hey everybody! Sooo , i want to do a program , which read all pixels of a bitmap image on a array 2d , the values to be color value for every pixel , after to ...
[5 replies] Last: @ats15: yeah , i checked a little that header(is a little big but i se... (by Croncanul)
please help me with this program
 
How do I change this code so that the user can choose a math operation and determine have that type of operation(either add sub mult or divide) run as much as a...
[no replies]
by enemy
Why is this program not printing (2,5)?
 
Hello! Please, why is result this function is ment to print not (2,5)??? Many thanks!!! #include<iostream> using namespace std; class point { private:...
[6 replies] Last: May I asked why you are not using a constructor instead of your initia... (by giblit)
by nvrmnd
reading from file
 
*Sigh*, i have no idea why the while() part below doesn't work (only always the first set was being read) (1, The C++ Programming Lang, Bjarne Stroustrup) ...
[3 replies] Last: wow, it worked when i directly copied the extracted values and didn't ... (by nvrmnd)
convertion
 
Alright so I want to have the data entered and then during the next two steps I want the string data to be turned into int then double but I cant figuer out how...
[2 replies] Last: Thank you thats help alot ^^ (by ProgramMaster)
Multiple Choice
 
Hi I was going to create a multiple choice quiz where the question was being input to a vector and then to a text file. Then it will display the questions from ...
[no replies]
help with ignore
 
Why does this work istream & operator >> (istream & ins, Grade & G) { ins >> G.category >> G.date >> G.possible >> G.received; getline(ins,G.name); ...
[1 reply] : cin is not ins . (by cire)
by ak16
Pointer value after Scope not NULL
 
Write your question here. #include "stdafx.h" #include "iostream" #include "conio.h" using namespace std; int* sendF() { int i = 123; int* ...
[3 replies] Last: Thnax guys kbw and Jaybob66. Means we get the value of i, because til... (by ak16)
Help please
 
Please help me I have to write a program that use the trapezoidal rule for integration f(x)= x^2. The following is my code, but I get stuck when writing fo...
[6 replies] Last: As an example (you have to extract the trapezoid function!) #include... (by condor)
by rjn237
HELP with simple program
 
Hello everyone, I am new to C++ as well as the board after missing some time in school and am in need of a little help. After missing a few weeks in class due t...
[13 replies] Last: Wow thanks giblit, very helpful (by LuminaChen)
Switch Statements
 
I have looked all over the forum to find out if this switch statement is legal. I have also banged my head on the wall to try and figure this out. Can a switch ...
[4 replies] Last: hey wildblue, Thanks for the help. I have been trying to do this all ... (by MRangel)
by jwilt
structs logic problem
 
I'm trying to separate the data into the separate warehouses so that I just output the warehouse name once and move all the data associated with that warehouse ...
[1 reply] : This is the current output WareHouse_Name Item_Name Quantity ... (by jwilt)
Not sure whats wrong.
 
I'm not really sure whats going on with my code. It looks right but for some reason, its stuck in what i think is an infinite loop. Any help would be appreciate...
[no replies]
Help
 
Hi, I am new to C++ and ive been trying to create a program and can't understand what im doing wrong Im trying to output stars on 10 lines and each line increme...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/125711/ (by giblit)
inline function
 
OK I am having trouble with inline functions. Every website I go too either shows how to use void, or a variable, but never both. The program is suppose to ha...
[8 replies] Last: well myint is undefined. int myint; (by giblit)
input and output for array
 
I"m practicing writing code and learning how to use array. I'm able to input the data..but the data that gets spit from the array is wrong once I put in the num...
[9 replies] Last: I got it to work and my out put was this: Please insert grade betw... (by kingkong200)
Help with finishing program
 
-snip-
[1 reply] : If u don't input anything and hit enter it doesn't work it just stops ... (by kmtompkins)
by SulaV
can i ask questions related to c?
 
int c; c=getchar(); while(c!=EOF) { putchar(c); getchar(); } it is suppoesed to print the char i entered but its not w...
[2 replies] Last: thanks long double main is this program suppose to count the characte... (by SulaV)
March 2014 Pages: 1... 5556575859... 79
  Archived months: [feb2014] [apr2014]

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