General C++ Programming (Page 2)

Memory alignment (1,2)
 
So I know that memory alignment to a 1 byte boundary may be used in special circumstances lets say y...
[23 replies] Last: so it could be padding, but it could be a short ( 2 bytes ) or 2(char... (by helios)
Mutiple or conditions
 
Hi, I have three conditions and want to go to the top of loop if any of these conditions is true....
[18 replies] Last: Ah, I thought you were referring to my 2 page calculator code which wo... (by jonnin)
by abuh
Please help me
 
1) Design and implement a class Person. Each object of the class person contains the FirstName and L...
[6 replies] Last: @ abuh It is indeed gratifying to find that you know all that. Have n... (by againtry)
reading input files
 
Hello, suppose i have a test.txt file that contains 1 0 3 2 1 4 3 2 5 and i want this to be t...
[9 replies] Last: #include <iostream> #include <fstream> /* test.txt 1 0 3 2 1 4 ... (by againtry)
Check out Yahtzee
 
Hi all. I had the source code up a few days ago, but took it down when I decided to improve the look...
[6 replies] Last: Hi all. I was hoping to be informed if there were improvements to the ... (by whitenite1)
by RicoJ
Template Function vs Function Template
 
if a function template is template <typename T> void f(T) { puts("master"); } and a template ...
[3 replies] Last: Nice, I searched around and did not find anything about " template fun... (by RicoJ)
writing to a file ( file formats)
 
I'm trying to make a simple steganography like program that will change every 50th byte of an image ...
[8 replies] Last: I always used uncompressed tga, which is similar to above but in stand... (by jonnin)
Passing std::function by value VS by reference
 
I have been thinking about this for some days and haven't been able to get an answer for this. What ...
[4 replies] Last: a nitpick, "// # PASS LAMBDA BY" is misleading; those functions are ta... (by Cubbi)
custom cmd line program in c++
 
Hi I am using zbar for barcode scanning. and I want to execute a commaand in command prompt provide...
[2 replies] Last: windows and dos both support pipes and files too. so system("program... (by jonnin)
Correcting a grid map display
 
Been trying to solve this for hours but has been futile. Below is a reproducible code #includ...
[7 replies] Last: Newbie812, your logic is inside out. You have generic loops and the w... (by dhayden)
Safe to ignore this warnings ?
 
I was playing around with modules in VS 2017 CE and got this warnings. Are they safe to ignore ? E...
[5 replies] Last: @Furry Guy, yes I set the project options. The code actually runs fin... (by Learner2)
by mehat
Double derivative by c++
 
//How to find the value of 2nd derivative. #include <iostream> #include <cmath> using namespace std;...
[4 replies] Last: And as an alternative to <vector>'s and subject to tidy-up terms can b... (by againtry)
template template : no matching function for call
 
this code compile fine in the old compiler (RAD studio XE4) in version 10.3 i get this error: erro...
[5 replies] Last: Thanks I think you're right. (by Ganado)
array
 
#include<iostream> int main(){ int row,question; scanf("%i%i",&row,&question); int a ; for...
[3 replies] Last: The stack's memory space is in the magnitude of a few MB. You're tryin... (by Ganado)
by gc2000
Double LinkedList
 
This is my program but it does not compile can you guys help me, if you need more code let me know I...
[3 replies] Last: After rearranging the code to get everything in the right order in one... (by dhayden)
Creating a very simple bootloader
 
Hi Guys, I'm following along with - https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os...
[12 replies] Last: Thanks Helios :) I actually tried adding the optional "0XFF" didn't s... (by adam2016)
When is move assignment/constructor is called
 
I am trying to understand when is the move constructor assignment is called: #include <string> #...
[4 replies] Last: is it copied, or it is optimized right to the function code The only ... (by helios)
Random number doesnt work as "usual"
 
Hi, i wanna set the range of a random number for myself: int x; do { srand(time(NULL)...
[4 replies] Last: <random> might be better suited to what you are wanting to achieve: ... (by Furry Guy)
How to linearize N-dimensional array index?
 
I'm trying to implement a simple n-dimensional array / tensor. Right now my class definition looks l...
[1 reply] : x -> data x,y -> data[x*columns+y] x,y,z -> data[x*columns*height + y... (by ne555)
Encrypted word dictionary with RSA encryption
 
Hello, I'm all over the place. But I wanted to make an encrypted word dictionary with the RSA system...
[9 replies] Last: I don't know what you are trying to do with the double, but be aware: ... (by jonnin)
Pages: 12345
  Archived months: [jun2020]

Cannot post in this page. To post a new message, go to the first page.