General C++ Programming - July 2019 (Page 5)

Problem working with C++11 Parameter Pack Expansion
 
Hello, I am facing a problem with C++11 parameter pack expansion. I have code somewhat like this: #include <iostream> #include <tuple> typedef struct { ty...
[2 replies] Last: Thank you very much for both the solution and the stack overflow resou... (by ralfmeier)
by a00
why do i need polymorphism (1,2)
 
I can call a function that i want to call, and not to use virtual function. for example this code. #include <iostream> using namespace std; class A{ public: ...
[26 replies] Last: I read that, member functions in class will override or hide the membe... (by a00)
My For Loops Aren't Working...
 
I've been wanting to make a very simple console based game in C++ and I was working on the map generation function but my for loops were not outputting the numb...
[3 replies] Last: No problem, and don’t apologize; it is a common mistake, even for pe... (by Duthomhas)
How can I check that a .dylib compile without errors
 
How can a check the integrity of a .dylib compiled in c++, its search path, linked libraries and possible errors?
[no replies]
buffer in recv function empty when receiving HTTP request from browser.
 
My program is supposed to work as a proxy to listen to HTTP request comming from my browser and pass it on to the internet as well as receiving answers from the...
[3 replies] Last: Sorry for taking so long. So... I figured it out. It was my browser's... (by Lsinzker)
intersection function in single linked list cannot work
 
#include<iostream> using namespace std; class node { public: int data; node* next; }; void print(node* head) { while (head != NULL) { cout << head->data <...
[4 replies] Last: asad butt, don't worry and do not be ashamed to ask if something is un... (by Emil Enchev)
Can't compile c++ code on Win64 for Win32 throught clang-cl
 
I tried to compile the program on Winx64 host machine for Winx32 platform. When I tried compiling it on Winx64 host for Winx64 platform without cl, it's work ok...
[no replies]
how to fix it !
 
Hour Distance Traveled ------------------------------- 1 40 2 80 ...
[7 replies] Last: I have read all of your messages thanks to you all. (by Reem Alnuaimi)
New Job Opportunity
 
Exciting opportunity for a Software Developer to join a leader in the ship and offshore structure design software market! About the Organization Trusted b...
[2 replies] Last: mbozzi, Let's spam. (by Emil Enchev)
C++ feature
 
Regarding C++ 20 Ranges Library, Will the C++ Ranges code compile with Visual Studio C++ 2019, Microsoft's latest compiler, using experimental include paths? ...
[7 replies] Last: What eagerness to get their hands on new C++20 features and make bugs ... (by Emil Enchev)
by vroll
Trouble getting "Bust" output in a blackjack program
 
I have everything working in this except when the user goes over 21, the "Bust! You lose!" prompt doesn't come up. I just included the relevant code. i...
[3 replies] Last: vroll, You probably have and others bugs too, but you don't know abou... (by Emil Enchev)
Computing using Arrays
 
Hi guys, I wish to know, how I can use each of the digits of a 15 digit code supplied by a user to compute a formula like this: Given that the 15 digit code...
[6 replies] Last: Can I get a solution which with little complexity but good effficiency... (by jonnin)
Calculator precedence
 
Hi guys, long time no post, any how I'm just doing some revision and re reading Bjarnes practices and principles, in chapter 6 we make a token calculator, we t...
[7 replies] Last: adam2016 , I don't understand logic yet, because I'm new in C++, but ... (by adam2016)
How to overload std::ofstream::put() ?
 
I want to write int16_t values to file. Therefore I tried to overload the std::ofstream::put() method: #include <fstream> #include <cstdint> class Ofstream ...
[9 replies] Last: I realized that the byte order for storing is irrelevant as long as t... (by dhayden)
by Zaap
Network prog : visible from web but not from my app
 
Hi, I made a program which allow a server and a client side to communicate. It works perfectly with local addresses (192.168.xxx.xxx), but when it comes to pas...
[7 replies] Last: Yes my IP is set to static. I'll see tomorrow what happen exactly with... (by Zaap)
by wk1999
warning for overload operator[]
 
I've got a compilation warning. It runs well but just a warning. Could someone please tell me why and what it is?...Thank. CODE: class A { public: A...
[5 replies] Last: > is it possible to implement such requirement with overloading operat... (by JLBorges)
compiler won't let me add Node struct as parameter
 
I have a function, void printElementsInNode( Node *node ), which is called everytime the binary search tree traverses from one node to another within void print...
[4 replies] Last: By the way, should data be of type Object ? (by doug4)
by frek
Returning a local variable from a function
 
Hi all, What's the obvious rule about returning a local value, be it a normal variable or pointer, from a function? Also, please take a look at this code: #...
[14 replies] Last: I used to use inline / forceinline keywords a lot, but a long time ago... (by jonnin)
July 2019 Pages: 1... 345
  Archived months: [jun2019] [aug2019]

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