General C++ Programming - November 2018 (Page 10)

Restaurant bill
 
I need to write a program in c++ that will calculate the amount each person owes. It needs to first ...
[3 replies] Last: Yes that's what the question wants you to do. -> First get how many c... (by Satan)
by Ganado
.. (1,2)
 
If you have an unsorted stack, as you have in your example, I don't see any way of doing O(log N) co...
[22 replies] Last: The problem closely resembles a codechef problem: https://www.codechef... (by Browni3141)
C++ matrix
 
Hello everyone, I am working on an assignment for my CS class and I am wondering how to make my ou...
[1 reply] : You have for (j=1; j !=i; j++) cout << "#"; that prints some # befo... (by keskiverto)
templated function doesn't work
 
I had written a sorting function that worked fine. But then I tried to make it templated and but don...
[10 replies] Last: Why we don't need to tell bubble_sort for which type it needs to work... (by mbozzi)
Array Issue In OOP
 
I am having a slight problem with OOP, and it does not allow me to use the unitialized variable of s...
[10 replies] Last: Glad to help. This is a great example of why a vector would have be... (by jonnin)
by doug4
Fun with Templates
 
I have embarked on an effort to create some fairly complex template classes that involve template fu...
[7 replies] Last: My question is why the commented out lines do not compile There's n... (by mbozzi)
by DellXT
Converter C
 
Hi. My task is to write a program that converts CP437 text symbols into UTF-8. I've done something b...
[1 reply] : look at it in a hex editor to see if the converted file (the one that ... (by jonnin)
Need help with C++ project
 
I don't understand what I am doing wrong, help please. Getting errors like 't': unknown override ...
[3 replies] Last: Your compiler should provide line numbers with the error. (by SamuelAdams)
Alternative to (this)
 
I have seen a lot of programs using this-> and i just wanted to know why and how it is used and what...
[4 replies] Last: I don't disagree exactly, but I am used to IDEs that tell me what they... (by jonnin)
by tpb
Deque and Map
 
He's just trolling now.
[1 reply] : This is the improved version of question that i have asked earlier...... (by doug4)
struct function with const
 
How do I return multiple elements through a function with const? #include <iostream> #include <cm...
[7 replies] Last: > can plug it back in to get the mid point of the mid point We can us... (by JLBorges)
by tojo
Palindrome issue
 
I am required to make a program that finds if a vector is a palindrome in as few lines as possible. ...
[3 replies] Last: #include <iostream> int main() { const int vector = { 1, 7, 3,... (by JLBorges)
Program will not exit loop using Do-While
 
As the title says, I cannot get my loop to stop when it gets to the "yes or no" to continue at the e...
[5 replies] Last: Stop putting a semi-colon ; on the end of every line. They don't aut... (by Repeater)
by helios
Problem Solving please help
 
Don't double-post. http://www.cplusplus.com/forum/general/245412/
[1 reply] : Post the updated question in the other thread. (by helios)
Can't read file in build but can read in IDE
 
As the title says, in Eclipse when I run the code it reads a file with no problems, but as soon as I...
[13 replies] Last: A simpler solution would be to just have the test file in the same dir... (by Repeater)
Help with test function and output
 
So whenever I have the test function in my program it won't output. And then when the input is...
[1 reply] : Perhaps your function test is firing those assert s and the program... (by Repeater)
by Raj12
Need help for my template class example
 
/*In the following code I made 'myArray' as class template. So how can I handle the friend function ...
[2 replies] Last: Thankyou very much Cubbi, The second link is very much useful for me. (by Raj12)
HELP
 
have gotten this far, but somehow i keep getting an invalid error , please help. i am supposed to di...
[3 replies] Last: Thank you (by girl101)
Bank Teller Program
 
I Have to Make a Code for School about A Bank Teller Program and it is not working everytime that I ...
[1 reply] : if (n = 4) will always be true. All cin statements will be executed ... (by Satan)
by Satan
Why is _getch() reading a whitespace character?
 
Notice the following: char foo; while (true) { foo = _getch(); cout << foo; } ...
[13 replies] Last: @Nwb Have you considered using PDCurses/NCurses? It's what I use for t... (by sergix)
November 2018 Pages: 1... 89101112
  Archived months: [oct2018] [dec2018]

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