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

by Borneq
Which socket library?
 
Which is good C++ socket library for Linux/Windows?
[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 << ...
[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...
[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...
[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.
[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...
[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...
[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> ...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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
[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 ...
[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...
[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.