Beginners - August 2017 (Page 5)

by Tobruk
Reading partially correct, but stops halfway - imbued wifstream into wstring with ConsoleCP changed to 65001 UTF8
 
Hello! This is my code: #include <vector> #include <iostream> #include <fstream> #include <locale>...
[7 replies] Last: reading from a file does not succeed. read from a file using ifstrea... (by Cubbi)
Accelerated C++ 8.6 exercise
 
Suppose that m has type map<int, string> and that we encounter a call to copy(m.begin(), m.end(), ba...
[7 replies] Last: Peter87, thanks a lot for your kind explanation. Your answer is indeed... (by Enoizat)
Trying to make a settings library
 
I am working on a library that allow settings to be easily stored in a file and easily accesed throu...
[7 replies] Last: I already considered something very similar where the filename was p... (by Thomas1965)
Error C2109. Probability Density Function
 
Hi All. I'm a newbie in C++. I want to change the function of probability density function from G...
[1 reply] : The problem is that nowhere in your code have you defined any array va... (by jlb)
I"M A NEWBIE...help me
 
Why is it allways says "WRONG" at the firsttime eventhough i write the correct password...help me:) ...
[19 replies] Last: > this argument depends on the personal opinions.... Yes. > is it o... (by JLBorges)
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)
WHY DOES IT ALWAYS SAY "A"...I NEED IT SAY "OK"
 
#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: https://uva.onlinejudge.org/index.php?option=onlinejudg...
[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)
August 2017 Pages: 1... 34567... 17
  Archived months: [jul2017] [sep2017]

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