General C++ Programming - April 2019 (Page 6)

writing your own application layer protocol
 
Hi guys, I am following this blog on how to write your own protocol - https://mayaposch.wordpress.com/2011/10/03/design-your-own-protocol-in-five-minutes/ ...
[4 replies] Last: If you notice this before people reply to both delete one of them... (by jonnin)
Finding weather calculations using arrays
 
I need help finding the coldest temperature using an array. I already found how to get the warmest temperature. #include <iostream> #include <fstream> using ...
[3 replies] Last: its the same as warm. int Coldest(const int A , int n) { int cold = ... (by jonnin)
sideway number pattern
 
I need to print the following 1 12 123 1234 12345 1234 123 12 1 I did the following and was wondering if there was a better way to do it. int ...
[2 replies] Last: a better way I’d go with the double loop (an inner loop inside ano... (by Enoizat)
by colt
Remotion of exit (-1) leads to segfault BEFORE exit (-1)
 
Hello, I recently implemented new code into my program that made him end into a segfault. Started to print messages on the terminal to be able to locate the pre...
[3 replies] Last: You should review functions in your favorite textbook. Color Color::... (by mbozzi)
Changing '7' to 7 (char to int)?
 
I know this is probably pretty basic and makes you wonder why I didn't look it up, but I did look it up . Unfortunately, everything I found was how to change a...
[8 replies] Last: I see what I did wrong while trying to.... You learned something val... (by deleted account xyzzy)
new and std::make_shared
 
I was trying to check whether an entry had already been created in a std::map and, if not, allocate new memory for said entry. The thing I don't understand is...
[1 reply] : p.reset( std::make_shared<std::set<int>>() ); p = std::make_shared<... (by Peter87)
Giving a slightly wrong input (Finding Increasing/Decreasing Interval of a Polynomial function)
 
Hello, I am trying to make a code which will input a function from the user and then will give the interval of function in which it is decreasing, as well as th...
[5 replies] Last: [edit - tag code as code, not output] You're actually hurting yourself... (by dhayden)
Need help linked list
 
I need to make this unordered list an ordered list and I don't know where to start. #pragma once #include <iostream> using std::cout; using std::cin; using ...
[4 replies] Last: Why do you insert at the tail of the list instead of at the head, whic... (by dhayden)
cout not working when using string
 
This basic code below shows my problem. When I don't use string, cout works fine but when I start using it, it stops printing things. Also, I can include <strin...
[10 replies] Last: The Problem You left out the information about using French outpu... (by Duthomhas)
compiler error at returning a reference
 
My error message: test.cpp -lsfml-graphics -lsfml-window -lsfml-system In file included from test.cpp:1: ./ResourceHolder.hpp:49:12: error: non-const l...
[2 replies] Last: Thanks, this works :-) (by nuderobmonkey)
hw question
 
Write a program to calculate the surface area (S) and volume of cylinder (V) if you know the height and the radius of the base of the cylinder. Use the followi...
[3 replies] Last: It depends on your point of view. Look at it from one side you can't t... (by MikeStgt)
Your favourite C++ engine
 
What is your favourite c++ ending? Mine is 100% Cocos2d-x, Godot is a good engine too but Cocos2d-x feels more, in a sense, C++
[5 replies] Last: [quote=malibor]standard libraries, DirectX, XAudio2, CNG, and the rest... (by deleted account xyzzy)
One or more multiply defined symbols found.
 
I came back to a project of mine after some time and I quickly remembered why I stopped working on it. I cannot solve this error: Error LNK1169 one or more m...
[3 replies] Last: > EDIT: Changing the code in my main file to include "game.hpp" instea... (by salem c)
by Denvor
triangle bumps
 
hi, I am trying to write a code that prints the following bumbs when the function void Ascii::printBumps(int num, char symbol1, char symbol2)is called with...
[2 replies] Last: #include <iostream> using namespace std; void row( int n, char symbo... (by lastchance)
I don't understand this error feedback
 
I am working with two classes each in their own .h file (although I think I only need to show one on here). I am using a different .cpp to define contents of ea...
[1 reply] : 1. Please edit your post to put [co de] tags around your code. > ma... (by salem c)
Constructor with two parameters
 
I have the following class and I don't know how to initialize it my constructor with the private variables. template<typename U, size_t N> class Bar { ...
[1 reply] : template < typename U, size_t N > class Bar { public: //... (by JLBorges)
by Pop007
error: 'biblio::Reference::Reference' names the constructor, not the type
 
Hi, I made a class that contain a pur virtual method wich I will implement it in the derivatives classes. But for now, I got an error in my .cpp file...here the...
[2 replies] Last: I have find out...all I have do is a Reference* Reference::clone() con... (by Pop007)
[Boost].DI template injection does not work as expected
 
Hi, The following code does not compile. It was obtained from https://boost-experimental.github.io/di/FAQ/index.html#can-i-inject-templatesconcepts. It is s...
[12 replies] Last: Downloading a header file to one's computer won't help, though. It ... (by mbozzi)
Help with stripped diamond
 
Hi I need to print a diamond with 2 symbols so that the two symbols loos like stripes, however I am not sure of how to get the symbols to alternate . ...
[4 replies] Last: #include <iostream> #include <string> #include <algorithm> using name... (by lastchance)
Android Studio c++ cocos2d-x error "Java: Invalide source release: 11"
 
Cocos forums down for some reason, It is my first time making a cocos android app, I linked up the emulator, have all the XML files but it won't build because o...
[1 reply] : This has nothing to do with C++, it has to do with the emulator so I d... (by Grime)
April 2019 Pages: 1... 456789
  Archived months: [mar2019] [may2019]

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