Beginners (Page 2)

Problem with solution to UVa 120
Hi, I've written the solution to UVa 120:
[no replies]
What's the use of making instance variable private if we compile the program?
Hi. Why use private variables inside a class? If the program compiled so, it isn't the same if they...
[9 replies] Last: Appreciate your informative comments, thanks. (by omer123)
#include<iostream> using namespace std; int main(){ system("color e9"); bool a=true; int x; c...
[6 replies] Last: could you tell me more details about why would we should use "char arr... (by phongvants123)
by i73
Understand multiple inheritance constructors better.
I'll show the code first: class A{ A(string name){ cout << "I am: " << name; } ...
[5 replies] Last: I'm dumb, I was creating an instance in my B class of A... Everything ... (by i773)
UVa 127
Hi, here I've coded the solution to UVa 127:
[2 replies] Last: Hi, in the parts of the code (detection if card has a move) while(1)... (by oldspiderdude)
by Bopaki
Getting an error on a generic Function template
When I compile this exercise20 program I get these three errors: 15 45 C:\Dev-Cpp\SavitchChapter1...
[2 replies] Last: Thank you Thomas1965 It worked fine after deleting all those lines. (by Bopaki)
Anyone knows why it din work
I try to write a code for sales and profit. profit is 10 percent of sales. and sales is 10 million ....
[5 replies] Last: Ya, you are right, integer division that cause the problem. Thanks a l... (by teopeishen)
Sams Teach Yourself - codes from book doesn't work.
Hello. I've just started my c++ learning. I've bought book called "Sams Teach Yourself C++" 8th edi...
[4 replies] Last: It does have c++14, tough i personally prefer using Atom as my IDE, lo... (by masecla33)
srand producing same random number every function call
I'm writing a program to create a hash table but the hash function keeps giving me back the same num...
[5 replies] Last: It's for a data structure class so we have to write each function for ... (by kingkush)
check if a value is odd and print odd numbers
I need to write a function that print the value of a given vector. The value of left is 2 and the ...
[5 replies] Last: vector<int> oddNumbers(int l, int r) { vector<int> result; // crea... (by mbozzi)
Array sum noob problem
I'm working on a problem from the C++ primer plus (5th edition) book, more specifically, chapter - l...
[4 replies] Last: Not very related but... You should put: using namespace std; This i... (by Chervil)
Read user input, output relevant message
Hi, I am trying to create a program that reads one-word user input and outputs a relevant message. W...
[1 reply] : I need it to have a bank of words it can recognize and a relevant mes... (by gunnerfunner)
display content of array from function call
I want to display the contents of array arr . Whenever I try to, I get funky out of bound negative v...
[6 replies] Last: @codewalker, @TheIdeasMan Thank you for your input. This is not a cla... (by PopRockCandy)
Passing pointer crash my program
So I'm trying to make elements from an array know about their neighbors, so they can interfer with e...
[11 replies] Last: Well I found the mistake, CheckForBounds, was glitched out because of ... (by DirtyBlasion)
RayCasting - sphere, plane and OBB
I have a problem understanding how excatly the intersection test when testing ray against plane, sph...
[no replies]
Why can't my function work the same way as a 1d array?
My question is why can't my program work the same way without 100 100 #include <iostream> #in...
[6 replies] Last: Still thank you and it's ok. can you recommend any other ways for the ... (by stonedviper)
Doubt related dynamic memory allocation
Please tell me the difference between following codes: - Because both time I got Same OUTPUT i.e "...
[2 replies] Last: While we're here, void main() is just plain wrong. main returns a... (by Moschops)
tic-tac-toe HELP
i'am a beginner in c++ and i was assigned to make Tic Tac Toe game i thought first i should make t...
[2 replies] Last: Hello ReHaMuhamed, I loaded up your program this morning, Although it... (by Handy Andy)
why is this double type number getting rounded?
I have the following very simple code: #include <iostream> #include <string> #include <Windo...
[1 reply] : I'm afraid double doesn't have better precision than that. #include ... (by Peter87)
Can someone explain this collision detection code please?
Hello, I'm learning about collision detection. Can someone explain the math behind these two simple ...
[2 replies] Last: Thank you so much for your explanation, I understand how all this work... (by MultiMedia)
Pages: 1234... 26
  Archived months: [jun2017]

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