General C++ Programming - February 2020 (Page 6)

Not using TEXT() macro in code on VS 2017
 
How do we do not to use TEXT() macro in coding visual c++ source but instead opt to either Unicode or Ansi option in settings of build configuration on Visual S...
[3 replies] Last: Whenever possible you should use the Unicode versions MS suggests an... (by deleted account xyzzy)
by b p t
Send string to request bin
 
Hi, I would like to send a string to requestbin.net So the user enters text to the string and right after he enters it, it sends to requestbin. Any ideas? Than...
[3 replies] Last: It partly depends on exactly what you mean by "send a string". It cou... (by b p t)
by Hex213
Can use std::thread with c++/clr?
 
Hello can somehow be used thread or its replacement in c ++ / clr?
[3 replies] Last: Conclusions: 1. Including <thread> gives the error "<thread> is not s... (by helios)
Network Connection
 
How can I connect to network with C++? What should I use? For example; I will enter a value for SSID and password in the network I want to connect. And program ...
[5 replies] Last: Well, thank you Carol for your now frank opinion, but saying it twice ... (by againtry)
How to reduce time limit on this?
 
I have this code: #include <iostream> using namespace std; int main() { int minutes; cin >> minutes; int start = 1200; int digits = 3; int counte...
[11 replies] Last: assuming you have a jillion of them to do, not just one Mine solves ... (by dutch)
General Tree implementation
 
Hi guys, so after looking at different implementations online I found them all pretty basic or at least lacking a lot of features, so I decided to try and im...
[3 replies] Last: ok. If its just for practice, I don't want to intimidate you but I wo... (by jonnin)
How to correctly use Visual Studio as c++ dev.
 
Why is the Notepad++ my Visual Studio produced as instructed in BUILD.MD having file size twice larger than its official release? How can the author squeeze to ...
[6 replies] Last: @Ganado, I was merely mentioning I said something before actually chec... (by deleted account xyzzy)
Folding a paper
 
Hi! My program should read multiple lines each of two integers, h and x. H is the thickness of the paper in micrometers and x the height I want to reach by fol...
[8 replies] Last: I should be reported. Quite right! It's not even 4th-world standard. (by againtry)
Error Help: LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc141-mt-gd-1_56.lib'
 
Hi everyone, I'm trying to run sample code for a 2D LIDAR sensor using visual studio 2019 and I receive the following error message when I try to build the pro...
[7 replies] Last: There is a VS2017 solution in the SDK package, you will likely need to... (by deleted account xyzzy)
by AlanB
Overloaded Functions with Const
 
I have this function called productName that is overloaded but I don't know what is happening in the parentheses and after. void productName(const std::string...
[4 replies] Last: Thanks for that, I didn't know you can pass by reference. (by AlanB)
UTF converting
 
Well, multi byte is no particular coding, hence you cannot convert it. What platform you are using? Under linux utf-8 is standard. When you use windows/visual s...
[no replies]
by dutch
Error when running +
 
EDIT: The lowlife pos OP deleted his posts from this thread. The second parameter to operator<< should be const.
[6 replies] Last: True, I suppose its not enforced! But that is going to yield weird c... (by jonnin)
Recursion and passing by reference
 
Hi guys I'm creating a vector that will represent a binary search tree, the root node will be the first element and the left child will be double the parent, t...
[11 replies] Last: So the vector would map vector indices to actual addresses and the tre... (by dutch)
Inventory Search
 
Hi am making a project in c++. i need to make an inventory of shopping mart, i just need to make a search option where i can search according to my preference i...
[1 reply] : you probably want a container of user defined objects, eg class item ... (by jonnin)
Notepad++ build problem
 
Apologize in advance but I do have this notepad++ build problem shattered me into bits.. After install VS 2017 with CLI, and fulfill the steps all way up to the...
[1 reply] : std::unique_ptr is defined in <memory> . (by dutch)
by TZB
Play MIDI sounds in C++ ?
 
Hello to all of you, I'm currently looking for a way to play MIDI sounds from a C++ software on a Raspberry Pi device. Is there a way to do it easily ? Fo...
[1 reply] : https://www.google.com/search?client=ubuntu&channel=fs&q=MIDI+sounds+f... (by salem c)
by joe809
Input Multiple Lines and Output "n" Amount of Lines.
 
So, I'm not that new to C++ but I'm still learning some of the basics. I want to learn how to input multiple lines. It can be using a for loop or while loop. ...
[8 replies] Last: I managed to get my answer. Thank you for the help. (by joe809)
How to use a dynamic array
 
Here I have a dynamic array: int* intArr = new int ; But how can I add elements to this array?
[11 replies] Last: Oh, so it's just like a normal array? And is there a way to add a thir... (by jonnin)
by volang
Can a map store class/struct?
 
Hello! :) Can a map hold a struct / class that can then be used to create an object? For example: struct s1 { int a = 0; }; mymap["s1"] obj;
[3 replies] Last: std::map<std::string, std::any> { { "s1", std::make_any<s1>() } }; ... (by mbozzi)
bool < operator overloading
 
#include "dbiguint.h" #include <string> #include <cstdlib> #include <iostream> dbiguint::dbiguint() { capacity_ = 1; data_=new unsigned short ;...
[14 replies] Last: ¿what's the value of `b.size()'? ¿is it 0? ¿is it 1? ¿is it -1? ¿... (by ne555)
February 2020 Pages: 1... 4567
  Archived months: [jan2020] [mar2020]

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