General C++ Programming - November 2020 (Page 2)

Devide integer in parts
 
How do I make a code where an integer is divided in parts? So if I have an int: for example 60593884...
[7 replies] Last: Another way is to use localizations. Consider: #include <iostream> ... (by seeplus)
How to read multiple text files in c++?
 
This is my code for one file: #include <fstream> #include <string> using namespace std; int main(...
[1 reply] : #include <iostream> #include <fstream> #include <string> int main() ... (by JLBorges)
Else If just doesn't work.
 
Please see codes below. What an easy concept but I can't get it right. When you type number 1, it o...
[3 replies] Last: Yes.... double equal sign, not single. Thank you! (by junweinehc)
How to create an optional for a type with no copy ctor?
 
Hi, I want to create an std::optional for a type that has the copy ctor deleted, like for this type...
[2 replies] Last: I am using VS 2019 version 16.8.2. The problem must lie in the Visua... (by JUANDENT)
by dman25
Output all IP addresses in network in specific range
 
Does anyone know how you can most easily output all IP addresses of a network in a specific range se...
[3 replies] Last: Scan, similar to 'nmap'? https://nmap.org/book/man.html The 'ipcalc'... (by keskiverto)
by Ocko91
cal
 
ok sorry for this long code ... it show me bunch of errors 1>calendarType.obj : error LNK2...
[5 replies] Last: @AbstractionAnon, The OP edited their post after our replies, the err... (by deleted account xyzzy)
Help with pointers
 
I got stuck in this assignment. I can't get the for loop to work. The loop needs to step through eac...
[3 replies] Last: To display an address of type char* using cout, you need to cast the p... (by seeplus)
Pattern mountain (progg. funda)
 
whats wrong with my code?? #include using namespace std; int main() { int n; cin>>n; int i...
[4 replies] Last: #include <iostream> using namespace std; int main() { int n {}; c... (by seeplus)
What Debuggers do you use?
 
Hey everyone! Was curious what debuggers people here use (or whether they use one at all) and why th...
[15 replies] Last: "Debugging is twice as hard as writing the code in the first place. T... (by keskiverto)
Need help with some numbers.
 
Hello coders. so I have here a code that works great, but here is a little issue I'm having. When in...
[4 replies] Last: thank you everyone for your hard work. :D (by Frank5093)
How to create defined users
 
I have a start up menu and I am able to create new users. Right now I cannot login until I create a...
[2 replies] Last: You're misusing your vector. An object in a vector (account) shouldn'... (by AbstractionAnon)
How does recursion work while defining multidimensional template array?
 
This is the code I found online. template<class T, unsigned ... RestD> struct array; template<clas...
[6 replies] Last: It is much easier to do "whole-array" operations (the equivalent of Nu... (by lastchance)
How to create a multidimensional array dynamic to the number of dimensions?
 
Let me preface by saying I have extensive experience working with Python. I am looking to build th...
[3 replies] Last: https://www.boost.org/doc/libs/1_73_0/libs/multi_array/doc/user.html#s... (by againtry)
Input to console
 
How can I output vector to the console. How I understand It shouuld be in main(). #include <iostr...
[1 reply] : For dealing with struct/class input/output, it's usually easier to cre... (by seeplus)
File editing help! (1,2,3)
 
Hello. I am trying to make a program that edits an .msbt file, which is a file containing a game's ...
[51 replies] Last: Come quickly Lord Jesus! Said the actress to the bishop.... (by againtry)
fast destruction of std::vector<std::pair<int, int> > (1,2)
 
Dear C++ experts I applogize for my frequent similar submissions, but I am really in trouble. I am...
[27 replies] Last: Finally, I could resolve a series of my problem relating to memory all... (by Mitsuru)
Memory location of return values of functions, relating to functional programming
 
Dear experts I sometimes wonder how Memory location of return values of functions is handled. Thi...
[2 replies] Last: Dear mbozzi I am going to use functional programming techniques in t... (by Mitsuru)
OOP communication protocol class
 
Hi I want to create a class A that contains a communication protocol for a RS232 interface. Furth...
[5 replies] Last: yes, you understood it. Client server may not need that registration... (by jonnin)
Is a number prime
 
Hello I got a task, and I don't have any idea how to do it. Maybe you can help me? There is given...
[11 replies] Last: for (int i = 3; i * i <= a; i+=2) // <-- (by againtry)
Getting the position of a element
 
How can i check if the position of an element in a one-dimensional array(vector) is odd or even? can...
[7 replies] Last: [quote=corepower]i solved the previous question That's stretching it ... (by lastchance)
November 2020 Pages: 1234... 7
  Archived months: [oct2020] [dec2020]

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