
please wait
by Pecvx
Regarding exception handling
|
Hello, is there any differences with putting the return statement outside of the try-block(like here), or as the last element within the try block? marked wi... |
May 18, 2019 at 3:24pm
[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 out. The code is as below. #include<iostream> #include<f... |
May 18, 2019 at 2:44pm
[13 replies] Last: Hello Beginner of C, The following program illustrates a different, I... (by Handy Andy)
|
by mrtammy2008
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 catch, I get prompted with the error message and it continues ... |
May 18, 2019 at 9:58am
[7 replies] Last: Hello mrtammy2008, @mbozzi @ne555 , sorry I don't understand anythin... (by Handy Andy)
|
by notacoder
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 xor of all the integers in that subarray. Your task is to fin... |
May 18, 2019 at 9:10am
[1 reply] : You know, you’re turning into a real spammer with these competition ... (by Duthomhas)
|
by Alien000
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 how to line up the question and numbers when asking for the ... |
May 18, 2019 at 9:04am
[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 class child's memory layout although it is top in hiearchy? Sti... |
May 18, 2019 at 7:19am
[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 both the header and source file for the library. Where shou... |
May 18, 2019 at 5:22am
[1 reply] : read a tutorial for the specific library, youtube or a wiki, a tutoria... (by poteto)
|
by colorfulpup
Sending function call operator to template
|
Hi! Building a simple multithreaded client/server program and i'm using a threadpool to handle the connections as they get accepted. I have the following code (... |
May 18, 2019 at 3:47am
[4 replies] Last: Ok, some advice ;) First, are you still doing this: ThreadPool thre... (by Niccolo)
|
by ketanco
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 move my mouse. ) |
May 18, 2019 at 3:01am
[14 replies] Last: @lastchance O -- nice :) Now... as an exercise only, please select ... (by MikeStgt)
|
by notacoder
Solution needed
|
https://www.hackerearth.com/challenges/competitive/Increff-CodeRunner-Contest/algorithm/magic-of-square-dd192013/ Getting TLE in my approach can someone give... |
May 17, 2019 at 10:50pm
[3 replies] Last: Duplicate "do all the work for me" post: http://www.cplusplus.com/foru... (by deleted account xyzzy)
|
by notacoder
Please help
|
https://www.hackerearth.com/challenges/competitive/Increff-CodeRunner-Contest/algorithm/bob-and-bombs-1-72cb4c59/ can someone give me solution to this question |
May 17, 2019 at 10:22pm
[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 errors. They appear for lines 39 and 51. I've gone to stock overf... |
May 17, 2019 at 8:03am
[8 replies] Last: I don't think that the arrays need to be changed to vectors since the... (by Peter87)
|
by stoneJax
Ascending Sort
|
I am trying to create a function that will reorganize an array of ints in ascending order by doing it recursively. The program stalls with a blinking cursor and... |
May 17, 2019 at 4:29am
[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 of the virtual destructor? class Item { long long ... |
May 16, 2019 at 4:42pm
[2 replies] Last: I'm not a compiler writer, but removing virtual from the subclass dest... (by Ganado)
|
by prinned
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++. There are various classes that act as bots that interact ... |
May 16, 2019 at 4:30pm
[2 replies] Last: fight() takes p1 and p2 by value, but to use polymorphism you have to ... (by helios)
|
by nimkmrgrg
Need help understanding bool
|
I was working on some exercises from class until I got stuck on a question and decided to have a look at the answer. This was the solution. int position(... |
May 16, 2019 at 2:01pm
[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 into the if statement it always accept it as compatible type... |
May 16, 2019 at 1:16pm
[2 replies] Last: #include <iostream> #include <cctype> bool answer_is_yes_to( const c... (by JLBorges)
|
by MikeStgt
Sieve of Eratosthenes defective
|
Dunning notice to beginners about a trap (I found again, unwittingly). Not the Sieve of Eratosthenes is incorrect, it's my migration from REXX to C++ here htt... |
May 16, 2019 at 10:11am
[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 implementation? Obviously it lacks functionality, and i'm assumin... |
May 16, 2019 at 1:40am
[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 Vilniaus 541278 Dusetos Utenos 4211 Aly... |
May 15, 2019 at 7:47pm
[3 replies] Last: if you need to count "how many times a unique word appears" then use <... (by anup30)
|