General C++ Programming - December 2016 (Page 5)

Base64 encoding for special characters
 
Hello, I recently downloaded a base64 library in C and it works perfectly for ascii characters but when i try to encode characters such as 'é', 'ù', or bas...
[1 reply] : Base64 doesn't consume characters, it consumes bytes, and makes no dis... (by Cubbi)
Help Needed with Chapter 4 Drill in PPP2
 
Please help me with this code (just read the comments to know what the drill is asking for since I've mentioned all of the specs there (the problem I'm having ...
[14 replies] Last: I'm going with @integralfx's version for how to stop input since it's ... (by DragonOsman)
by Tresky
Handling Errors for Big Projects
 
Hey everyone, I'm looking for some general advice. When working small scale in C++, handling errors either using exceptions or sans-exceptions is of little con...
[16 replies] Last: [quote=SamuelAdams]When i think of a large project i'm thinking 20+ pr... (by Cubbi)
Split const char*
 
Hi, How to split const char* into two const char*. I have one const char* with + in between which need to split. Eg: abcd+efgh in two const char* abcd & ef...
[2 replies] Last: Thanks Peter :) (by sam1989)
Error printing tetris blocks within the game map
 
I have been learning a little bit of C++ and decided to recreate a game ofTetris. The problem here is when I tried to display the tetris block within the game m...
[2 replies] Last: Ahh I see, I wasn't thinking of that, Thanks! (by bolinft)
no match for 'operator=' for vector iterator
 
Solving below problem and getting error: Problem statement: Find the contiguous subarray within an array (containing at least one number) which has the larges...
[2 replies] Last: > I am not getting this error on all c++ compilers. There is no error... (by JLBorges)
At loss with a memory bug
 
Hey guys, I'm currently writing a C++ program and I've come across some weird segmentation fault. With luck I found out that some variable of some class of m...
[3 replies] Last: If you know which "some variable" is guilty, simply print out that var... (by SamuelAdams)
Runtime Error
 
Hi All, I was trying to solve one problem so written a below solution for that. Problem : Given a non-negative number represented as an array of digits, add...
[5 replies] Last: OP: doug4 gave you a pretty succinct summary of what was going wrong i... (by gunnerfunner)
keep_window_open() function won't work input for-loop program
 
I have this code: // Osman Zakir // 12 / 18 / 2016 // Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition // Chapter 4 Section 4.6.3 ...
[4 replies] Last: Either from a console or from an IDE is fine. Running it directly fro... (by DragonOsman)
GLFW vs SDL vs SFML
 
Hi everyone, I suppose this question has been asked thousands of time on the forum but I ask it anyway: I want to start creating a nice and clean 2D game,...
[3 replies] Last: If you just want to write a game, not an engine, I recommend LÖVE. (by helios)
Access
 
Good afternoon fellas! I have a question. This is a snippet from a program. In this snippet i draw bunnies from my vector into a screen. It works great. However...
[1 reply] : You may consider to use a 2d array. In that case x must be set befo... (by coder777)
by faeory
flight reservation system
 
Hi everyone ,i have a problem programming this project. ill be very thankful if u help me solve it ..the project info: in this project you are required to desi...
[5 replies] Last: how to explain and define the inherited and the main classes in my pr... (by gunnerfunner)
by alware
toitoi 2
 
#include <iostream> #include <fstream> #include <string> #include <vector> #include <queue> using namespace std; struct Vertex { int visited; ...
[2 replies] Last: The bitwise or on line 49 and bitwise and on line 58 look rather h... (by cire)
Little to Big Endian not working
 
Hey guys, I'm writing a parser that can read in .wav files and simply parse the header. I know it's been done before but I was hoping to implement myself and so...
[2 replies] Last: Yep, switching it to an unsigned char array definitely worked. Using t... (by ltadrian)
searching and printing arrays
 
I'm having trouble with having the user input data into the arrays and I am having issues printing and searching them. Here's the problem. (Arrays, Searchi...
[1 reply] : OP: take a look at the solution I suggested here - http://www.cplusplu... (by gunnerfunner)
Structure
 
Hi Guys can you help me with this problem ? I can't quite get it :( I'm new in C++ :( Write a C++ program to keep records and compute for the scores of 5 play...
[10 replies] Last: addrecord is done by the ctor, viewrecord by the overloaded << operato... (by gunnerfunner)
Unique numbers
 
The following needs to happen as output a , b , c + d, e ,f = g, h i example 275 + 193 = 468 each number ranging 1 - 9 is only allowed once. All I know is...
[9 replies] Last: Fix? // next_permutation example #include <iostream> // std::cout... (by keskiverto)
by mosfet
Project LOGIC SIMULATOR
 
Hi everyone! I'm studying c++ for university. I've to implement a Logic Simulator, which gets two input files: 1)input.txt regarding circuit's toplevel inputs; ...
[3 replies] Last: Yes. (by helios)
Overloading Operator - argument error
 
hey all! i've written a class Polynomial with several methods i'd like to add 2 polynomials and add a scalar to a polynomial, therefore i wrote 2 methods but m...
[3 replies] Last: thank you very much, its now perfectly working! (by blubberblase)
std::thread::hardware_concurrency
 
Hi, i've just tried to output std::thread::hardware_concurrency on my laptop under different Oses and was rather suprised. and if cygwin with gcc 5.4 returns...
[3 replies] Last: meanwhile version of gcc under debian is 4.9.2 The latest version ... (by TheIdeasMan)
December 2016 Pages: 1... 34567... 18
  Archived months: [nov2016] [jan2017]

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