Beginners (Page 2)

Help pls. how can I enter characters without enter ?
Help how to cin() && '\n' with std ? #include <iostream> using namespace std; int main() { w...
[1 reply] : You probably need a function such as getch() from NCurses: https://w... (by RUNNER PRO AGARIO)
Const redeclared in main() with new value?
What happens if you redeclare a variable that is already static and declared outside of main() kind ...
[1 reply] : This is known as "shadowing". In the scope where you have created anot... (by Repeater)
number of possible permutations in arranging elements
I have a sequence a with length N created by removing some elements (possibly zero) from a permutati...
[2 replies] Last: (by jarvis123456)
by rynone
Multidimensional Array Pointer
I need to create a dynamic array. I have read many forums and the best solution is to create a sing...
[8 replies] Last: I've changed my code to follow tpb's example above and it gives me th... (by tpb)
Array of Pointers to Class
Can someone help with this question? I'm getting confused to check the null value A cowshed with 5...
[3 replies] Last: I have one more question. I separated my Programm in cpp, hpp, and mai... (by kik1116)
File Handling : Getting One Extra Character!
So I was going through File handling again trying to make a big program to perform certain operation...
[2 replies] Last: It is because your first implementation tested the stream state after ... (by jlb)
by Nirit
trying to print a vector in a reverse order. receiving casting error on the last loop. don't underst...
[1 reply] : // for (std::vector< int >::reverse_iterator rit=vec.rbegin();rit!=ve... (by JLBorges)
advice please
[1 reply] : You'd want to read in user input using a string instead of an integer ... (by Uk Marine)
by jplank
How to reference elements of a returned vector
I have a class that returns a vector. void test(vector<double> v){ return v } I do...
[1 reply] : Normally you pass a STL container by reference or const reference sinc... (by Thomas1965)
by Lehti
Linked list nodes: pros and cons of each approach to writing them
I'm currently in the middle of studying for my Programming 2 finals, which essentially is a practica...
[2 replies] Last: > Does anyone know of any other approaches to writing nodes? This is ... (by JLBorges)
Search function only works for the first object
I am having a hard time with my search function. It only finds the first created object. Any ideas w...
[2 replies] Last: ah yes, That fixed it thank you! (by keweisbrod)
by facade
Having a hard time calculating percentages.
Use a sentinel controlled while loop that will ask the user to enter student grades until a value of...
[1 reply] : percent is literally just a division by 100 of something. Generally ... (by jonnin)
by Donut
If Else If vs Switch
The code below works but I have to believe there is a better way. I am brand new to programming and ...
[5 replies] Last: I worked on the code some today after reading through some tutorials a... (by Donut)
need help with some homework
my teacher has given me a assignment for c plus but im at my wits end here. im so frustrated! heres ...
[1 reply] : The keyword here is "calculate". You're not doing any calculations her... (by Lehti)
Pulling best/worst data from a file
everything in my code is working as it needs to, except the best and worst MPG. two issues are happ...
[4 replies] Last: Yeah just caught. thanks for your quick responses. Its all working no... (by justStarting)
by hoogo
Issue reading from file.
Hey! I'm writing a function for my game. This function reads data from a file and stores it into a ...
[5 replies] Last: My bad, I was trying to access slots .Rect whereas I defined it as ... (by hoogo)
Double Derivatives and Beyond
So I've actually gone through calc classes A through C, but it occured to me that I have done nothin...
[2 replies] Last: You are using the first derivative to get the second. This sounds good... (by lastchance)
by jojo56
Sorting Arrays
I can't seem to change this to descending from ascending, please help. /* *Author: Joe *Da...
[1 reply] : To sort it descending you need to call sort with a comparer. http://ww... (by Thomas1965)
unable to analyse a line of code in c++
what does this line of code mean and what is it's use? cin.ignore(numeric_limits<streamsize>::max...
[3 replies] Last: Here is a topic I recently posted, it was about stream object and not ... (by hoogo)
trouble! help?
i need help im trying to get the second line to output but it just keeps saying the same thing as if...
[3 replies] Last: Here you need to change code with (grade==a) as well as (grade==b), Th... (by shivkumar12)
Pages: 1234... 30
  Archived months: [apr2018]

Cannot post in this page. To post a new message, go to the first page.