Beginners - May 2019 (Page 8)

by Pecvx
Regarding exception handling
 
Hello, is there any differences with putting the return statement outside of the try-block(like h...
[1 reply] : Hello Pecvx, I would say yes. When you look at the structure of the f... (by Handy Andy)
writing to a text file
 
I am trying to write to a .txt file lyingon my desktop but it is not working. If anyone can help me ...
[13 replies] Last: Hello Beginner of C, The following program illustrates a different, I... (by Handy Andy)
Why does my program end when it's in the second loop of try catch?
 
So here's how the error occurs, first I type in 2.2 or any error that is not accepted by my try ca...
[7 replies] Last: Hello mrtammy2008, @mbozzi @ne555 , sorry I don't understand anythin... (by Handy Andy)
Approach for the question
 
You are given an integer array A of size N. XOR power of any subarray of array A is defined as the x...
[1 reply] : You know, you’re turning into a real spammer with these competition ... (by Duthomhas)
Making decimal points lined up
 
Hey guys! I'm trying to line up the decimal point results at the end. Also I'm trying to figure out ...
[8 replies] Last: std::put_money method (works well only if the locale of interest is ... (by JLBorges)
by sturk
C++ virtual inheritance memory layout
 
Hi, I am trying to figure out why _vptr$Grandparent & grandparent_data occupy the last memory in cla...
[1 reply] : Why do you want to know (or care)? It is (at best) a peculiarity of y... (by salem c)
Adding external library
 
Hello everyone, I want to add an external library into my c++ program(I use Dev c++ IDE).I have...
[1 reply] : read a tutorial for the specific library, youtube or a wiki, a tutoria... (by poteto)
Sending function call operator to template
 
Hi! Building a simple multithreaded client/server program and i'm using a threadpool to handle the c...
[4 replies] Last: Ok, some advice ;) First, are you still doing this: ThreadPool thre... (by Niccolo)
Open a screen , draw a line with mouse
 
Hi, What code do I need to open a blank screen ? (On that screen, I want to draw, when I will mo...
[14 replies] Last: @lastchance O -- nice :) Now... as an exercise only, please select ... (by MikeStgt)
Solution needed
 
https://www.hackerearth.com/challenges/competitive/Increff-CodeRunner-Contest/algorithm/magic-of-squ...
[3 replies] Last: Duplicate "do all the work for me" post: http://www.cplusplus.com/foru... (by deleted account xyzzy)
Please help
 
https://www.hackerearth.com/challenges/competitive/Increff-CodeRunner-Contest/algorithm/bob-and-bomb...
[2 replies] Last: Duplicate "do all the work for me" post: http://www.cplusplus.com/foru... (by deleted account xyzzy)
How to make arrays work when "Expression must have a constant value." keeps showing up
 
"Expression must have a constant value." appears four times in the error list and are the only error...
[8 replies] Last: I don't think that the arrays need to be changed to vectors since the... (by Peter87)
Ascending Sort
 
I am trying to create a function that will reorganize an array of ints in ascending order by doing i...
[10 replies] Last: Thank jonnin! I appreciate all the info. I'll keep that one in my back... (by stoneJax)
by sturk
Memory layout of derived class
 
Why is there a vptr:void* in the memory layout of class itemtobuy. Is the class virtual? Is it becoz...
[2 replies] Last: I'm not a compiler writer, but removing virtual from the subclass dest... (by Ganado)
Why is my bool function returning 12 and 24 (but only when called upon by another function)?
 
I'm trying to make an iterated prisoner's dilemma tournament to get more familiar with classes in C+...
[2 replies] Last: fight() takes p1 and p2 by value, but to use polymorphism you have to ... (by helios)
Need help understanding bool
 
I was working on some exercises from class until I got stuck on a question and decided to have a loo...
[6 replies] Last: The name "found" was clearly chosen to express what the variable repre... (by keskiverto)
Clear Buffer
 
Hello, I'm trying to prevent error from user input but when i check if the values are compatible ...
[2 replies] Last: #include <iostream> #include <cctype> bool answer_is_yes_to( const c... (by JLBorges)
Sieve of Eratosthenes defective
 
Dunning notice to beginners about a trap (I found again, unwittingly). Not the Sieve of Eratosthen...
[no replies]
by ICantC
smart pointer linked list - leak free?
 
I'm new to templates and smart pointers, I'm wondering if the below is pretty much a leak free imple...
[3 replies] Last: Your initial theory is correct. If you delete the first node, that wi... (by Niccolo)
by wuwy
How to count how many times unique word appears
 
For one part of exercise I need to count how many areas there are: 15 Vilnius Vilni...
[3 replies] Last: if you need to count "how many times a unique word appears" then use <... (by anup30)
May 2019 Pages: 1... 678910... 16
  Archived months: [apr2019] [jun2019]

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