General C++ Programming - September 2020 (Page 3)

by Borneq
Which socket library?
Which is good C++ socket library for Linux/Windows?
Sep 17, 2020 at 4:04pm
[4 replies] Last: SFML has a good easy socket lib as something to add to this list. (by Computergeek01)
Input from Keyboard
#include <iostream> using namespace std; const int N = 3; int main() { int i, j; double matrix [N+1]; int k = 1; for (i = 0; i < N; i++) { cout << ...
Sep 17, 2020 at 9:40am
[5 replies] Last: Can anyone help me how can I get any value of N from the keyboard but... (by coder777)
Creating a Union of two linked lists
I am trying to create a function that unites two linked lists. I have created a function that does exactly what I am trying to do but as an array of sets instea...
Sep 17, 2020 at 3:53am
[2 replies] Last: @jonnin template<class ItemType> LinkedSet<ItemType> LinkedSet<Item... (by Depressed)
Where can I find a web browser that is embedded as an image or can I make a window into some kind of image
So what I want is to be able a game engine with a computer that has the internet with real content for AI stuff. I understand web scraping but I want it to be a...
Sep 17, 2020 at 12:28am
[2 replies] Last: helios, maybe the OP wants some form of OLE (Object, Linking & Embeddi... (by deleted account xyzzy)
Is there a way to include all directories within a directory in an IDE I'll use anything
This is Problem because I am trying to use frameworks and I need to include header files and I can't specify each one.
Sep 16, 2020 at 7:47pm
[2 replies] Last: This is Problem because I am trying to use frameworks and I need to i... (by mbozzi)
code won't print the calculations from my input values, it keeps asking my to input the values i want it to print
//monthly payment on a loan formula steps //1 + rate all to the power of n //above times rate //all over line 2 minus 1 //all above times L //Rate is the...
Sep 15, 2020 at 6:30am
[1 reply] : How can the program print results if it doesn't run? Once you fix you ... (by Thomas1965)
HeapValidation Error
I'm trying to callback using a pointer to a base type, but something along the way is giving me a HeapValidation error. But I have no idea where it's messing u...
Sep 14, 2020 at 9:56am
[4 replies] Last: I found this: Player & find_player(uint32_t id) { if (players.find(I... (by kbw)
by AFX
OpenMP - array-initialisation problem
I am dabbling in OpenMP, and now I am trying to create a league of teams with the OpenMP num_teams construct. #include <omp.h> #include <stdio.h> ...
Sep 14, 2020 at 7:50am
[2 replies] Last: Thanks :) (by AFX)
by colt
Const initialization of an array of objects
Hello, I am trying to do a constant initialization of an array of "Vec3f" instances. Currently, I tried to implement it based on the code of a const initializat...
Sep 13, 2020 at 5:51pm
[11 replies] Last: Yes, I actually have them: #ifndef BVOLUME_H_INCLUDED #define BVOLUM... (by colt)
Storing data from a file from multiple lines into different variables
Hi There, I have been doing files in c++ for about a month now and I have a grip on how to do basic questions. However I cam across this question that needed me...
Sep 13, 2020 at 4:36pm
[2 replies] Last: Show what you've tried, and explain exactly what each line/item of the... (by jlb)
quicksort
i am getting a segmentation fault at line 12. when i tried to print temp, it went in infinite loop. can you tell me the reason behind this and how to correct it...
Sep 13, 2020 at 9:20am
[2 replies] Last: can you tell me the reason behind this Use the debugger to trace t... (by seeplus)
what is a requires requires constraint?
Not sure if I understand the use of requires requires as in this code: template<typename T> requires requires (T x) { x + x; } // ad-hoc constraint, no...
Sep 12, 2020 at 11:30pm
[1 reply] : The requires expression is an unnamed concept right? It's an expressi... (by mbozzi)
by jerryd
Can't access variables in my header file
cplusplus forum, C++ MS VS 2017 Windows 7 I have one of my header files, that I have used before, #included in my solution. It compiles ok and th...
Sep 12, 2020 at 1:24pm
[12 replies] Last: This is like trying to diagnose a problem with your car when you haven... (by dhayden)
Differing (Bad) Behavior Between unsigned int And long With -= Operator
Hi All, The following section of code was designed to show a wrong bit of programming, but it has a weird side effect that I cannot explain. It seems that wh...
Sep 12, 2020 at 7:10am
[4 replies] Last: Thanks for the detailed answer, helios! (by travellerne)
uncertainty
You don't need a default constructor as std::string has its own. Note that stream extraction (>>) stops when a white-space char is found. So you can't enter sa...
Sep 11, 2020 at 2:18pm
[1 reply] : Please don't delete/erase original question. Subsequent answers are pr... (by seeplus)
Error: Unhandled exception etc
Hi, I am trying to modify my function add() so it throws an exception every time an array passed already matches what is in the set. The code compiles but m...
Sep 11, 2020 at 1:36pm
[11 replies] Last: Shouldn't add() be using contains() (or .getIndexOf() )? template<c... (by seeplus)
std::copy wrong value issue!!!!!!
I copied the struct into a vector and put it back into the struct. Why did this bug occur? use std::copy incorrectly? struct test_msg { public: in...
Sep 11, 2020 at 12:19am
[5 replies] Last: Thank you for answers. it was helpful (by realbro)
Need a variadic template function that accepts a arbitrary number of ints!
Why is this not working? template<int...Counts> static bool allNonZero(Counts...counts); Regards, Juan
Sep 10, 2020 at 1:47pm
[4 replies] Last: I did thanks!!! (by JUANDENT)
by AFX
Question concerning number of threads in OpenMP programme
Hello, I am starting to learn parallel programming with OpenMP. I stumbled over an interesting tutorial: https://bisqwit.iki.fi/story/howto/openmp/ There ...
Sep 10, 2020 at 7:04am
[3 replies] Last: Thank you very much! My question was more or less inane. (by AFX)
symbols?
Hi guys, I'm looking for a good resource or even an explanation on symbols, so I'm currently reading about calling conventions and they seem to click, in a sim...
Sep 10, 2020 at 12:56am
[4 replies] Last: I'm sure each function or symbol has an offset as to where it begins ... (by helios)
September 2020 Pages: 1234
  Archived months: [aug2020] [oct2020]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.