General C++ Programming - December 2018

by PaoloM
Exchange of values
 
The exercise requires to upload a vector of N elements and to exchange the first value with the last one, the second with the second-last etc. Please, who kno...
[6 replies] Last: Oh sorry, I’ve just tried and it works fine. Thank you (by PaoloM)
by emron
Find the nearest point from 10 coordinates?
 
Hello everybody, Question 1: There are 10 houses in the neighborhood, the coordinates of the houses are given. A central building will be established in this n...
[7 replies] Last: helios: I suspect the question being posed is closer to your #1. I thi... (by mzimmers)
by Grime
How to communicate between different programs?
 
Suppose you have two C++ applications that are running simultaneously. What's the best way to communicate between them (I'm just curious, no practical purpose h...
[4 replies] Last: Communication between programs is (usually) less dependent on the lang... (by mzimmers)
by PaoloM
linker command failed with exit code 1 (use -v to see invocation)
 
the program seems to be correct but there is this error. who can help me? pleasee #include<iostream> #include<stdlib.h> #define l_max 999999 void carico(f...
[10 replies] Last: Oh my days...I'm very sorry. I only forgot to write the function. Than... (by PaoloM)
Why is "operator delete" called twice for my code when only one temporary is created.
 
Hi ppl :), I have implemented "append" function for my string class in terms of operator "+=" as below : append() : string& string::append(const string&...
[2 replies] Last: Thanks a lot @Peter87 for the explanation :) (by kapil2905)
Looking for help
 
I need someone to write me a c++ code that gives me the temperature of a certain city in the time I run it... I tried a lot and searched a lot also but unfortu...
[5 replies] Last: No the standard library doesn't know anything about the web. You would... (by Thomas1965)
Which pointer type to use when we just want to point to an object.
 
Hi, Consider the following implementation of "string iterator" class iterator { private: string* str_; size_t index_...
[14 replies] Last: Thanks poteto for your suggestion :) (by kapil2905)
by Grime
Inserting to stdin?
 
Is there anyway that I can insert to stdin? Why insert to stdin you ask? the line - while(cin >> var) {...} would be an infinite loop unless cin goes int...
[8 replies] Last: Enoizat, here the exit value is whitespace :-p Thanks dhayden (by Grime)
What is the meaning of stable interface ?
 
Hi, I was going through isocpp guidelines and came across a guideline for inlining functions here : https://isocpp.github.io/CppCoreGuidelines/CppCoreGuideli...
[2 replies] Last: Got it Peter87. Thank you :) (by kapil2905)
Anyone up for a fun freelance project?
 
If anyone is up for a freelance on Wheel of Fortune then please PM me.
[1 reply] : What about posting in the ‘Job’ section of this forum? (by Enoizat)
regarding hashing
 
Dear all, I have a big set of strings, let us say S={str_1, str_2, ..., str_n}. I give this set to a number of network nodes, let's say N={N_1, N_2,..., N_k}...
[6 replies] Last: Each node has a hash function. Are you saying that each hash functi... (by dhayden)
Why chromium does not use c++ exception safety mechanism.
 
Hi, I tried using a try-catch block in chromium code and the build failed after it. I found out that try-catch mechanism is not used at all in chromium. ...
[2 replies] Last: Thankyou Peter :) (by kapil2905)
Online coding practice
 
I was trying to solve a problem on codechef named "Chef and Girlfriend".My solution got rejected, so I went to submissions to look at a solution. After going th...
[3 replies] Last: > And I tried after changing data type to float for variables "gap" an... (by salem c)
by oahz
I want to visualized my algorithms
 
1. I want to write solutions to algorithm and data structure problems. 2. I then want to be able to create animations on a web browser that would bring these a...
[3 replies] Last: Not much idea on python. I just wanted to bring to your notice that to... (by SOURABH PRAKASH PATI)
How to get the odd and even parity on a game board
 
I am creating a memory game where there are "X" and "O" on the board. The user selects particular row and column to change it to "X" if it is "O" or to change i...
[11 replies] Last: [quote=philip1999]@lastchance, Thanks, for the reply. But, I am not su... (by Browni3141)
by Grime
How does vector work?
 
For older compilers that do not support standard template library, using vectors is not an option. So if I want to make a dynamic array, I would have to use ...
[16 replies] Last: What is the rationale behind the use of old tools that do not support ... (by jonnin)
Template for calling different methods in a loop
 
I am working on an OpenGL c++ project that has objects that can be drawn on the screen in a 3D environment and also need animation. I have lots of functions as...
[7 replies] Last: If you have an implementation that supports C++17, just use std::invo... (by JLBorges)
by Safaa4
Converting a binary number to decimal
 
we were asked to turn a binary number to decimal so I did this #include <iostream> using namespace std; int main() { int binary, converted = 0; in...
[8 replies] Last: Thank you jonnin and FurryGuy for the help! We have been taught about ... (by Safaa4)
Variable nested loops for variable vector sizes to find the element combinations
 
Hello, I am trying to get the combination of my vector element from N number of vectors of variable size. Is it possible to do it by recursion? i am not abl...
[5 replies] Last: But, Seems like i figured out . #include <iostream> #include <vec... (by AkshayMalige)
Write data after the search keyword
 
Hi, I have a file of 1gb, I'm searching for the term "topics" in it, after finding the search term I want to write that particular sentence (where "topics" p...
[9 replies] Last: Thank you once again (by Roshmitha)
December 2018 Pages: 123... 10
  Archived months: [nov2018] [jan2019]

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