General C++ Programming - January 2018 (Page 8)

declare std::vector with N size in struct member
 
Hi, how could i do this? thanks. using sv = struct { any sym; any val; }; using svv = std::vector<s...
[4 replies] Last: You'd have to post a *minimal* program that produces that message: the... (by Cubbi)
How to convert jpg to avi file?
 
Hi, I developed code below to convert jpeg to avi, but it does not work. Could you help me? A...
[2 replies] Last: I think you just decompose the jpg back to logically a "2-d" image of ... (by jonnin)
Error in recursive function (1,2)
 
Hi everyone, I was tasked with writing a program, that for an input n returns a wall with the bigges...
[27 replies] Last: #include <iostream> #include <vector> #include <algorithm> #include <... (by lastchance)
False sharing issue for multiple serial codes in multicore pocessror
 
I am running serial jobs in a compute nodes with 24 core (48 thread). When I run only one job in...
[3 replies] Last: Linear time decrease for running more copies tells me that it may be t... (by jonnin)
Long multiplication is wrong.
 
Hello, I'm trying to calculate big numbers but it's not working. I turned every variable into long a...
[8 replies] Last: Thank you very much! (by Putarda)
Using Bus Card Object in the User Object
 
Hey guys, I want to use CARD object for the USER object. This is a simple Public Transportation Card...
[3 replies] Last: You're welcome! I think I've already answered your question, as far a... (by MikeyBoy)
by urko18
Problem saving an array
 
Hello everybody, I am doing a program in arduino and I have a question / problem: My program c...
[12 replies] Last: I'm sorry jonnin, but I've been ocupated and also have coincided Chris... (by urko18)
by Handge
ASCII-based Text RPG
 
I have finished Act I in my new ASCII-based Text RPG. To attack there is a bar in which when you pre...
[6 replies] Last: Thanks, I am going to add more items etc. The sentences you see appear... (by Handge)
The default meaning of precision?
 
I'm trying to understand what precision actually means by default (without using std::fixed and simi...
[5 replies] Last: Ah, OK, thank you, so it becomes printf("%.5e\n", 0.00001) which pri... (by Peter87)
Username and password
 
This code is wrong in somewhere.Can you help me find out, how to display of any account that i just ...
[2 replies] Last: It would be easier if you create a struct and use a vector. struct A... (by Thomas1965)
Behavior Of Destructor
 
Hi, I am trying to work with shared_ptr ,and trying to execute a simple binary tree. However the beh...
[3 replies] Last: Thanks Cubbi,I was wondering over mbozzi's answer. Now I can track my ... (by NiharRNanda)
Constructing Class in Function to be used Elswhere
 
Hi. I have three classes. Image Text buttonObj They all have unique constructors and functio...
[3 replies] Last: Please provide: a.) the error message(s), verbatim; b.) the definition... (by mbozzi)
Programming Assignment
 
I'm very new to programming, and I would really like help, just enough to know where to start this p...
[1 reply] : Hi, do you know how to read from a file? You should read http://www.cp... (by Ganado)
Difference between a standard facet and it's _byname version
 
I have tried deriving a custom numpunct<> facet from both numpunct<> as well as from numpunct_byname...
[no replies]
Code works with Template Function but doesn't with Template Struct
 
There are 2 snippets of code: the 1st works, the 2nd doesn't 1st uses functions template <typen...
[2 replies] Last: Are you sure the first Error is the one reported? I would expect 'con... (by gedamial)
Programming Assignment
 
I have to create a program that asks a person to enter numbers (1-99) and convert it into words. I'v...
[3 replies] Last: Another way to handle this might be to input the number as a string, t... (by mainecat)
How to support an MP3 controller in my software
 
I have DJ software and I would like to be able to control it via an mp3 controller just like the res...
[no replies]
Why (void) at the start of an expression?
 
Hi, I have this code: static void _(Types... t) { using swallow = int ; (void) sw...
[1 reply] : Casting to void is used to signal that the author knows there is an "u... (by cire)
by a10e29
srand() frequency
 
How often should someone call srand()? Is it worth it to call it more than once? For example before ...
[5 replies] Last: as a side note, you can use these things as a hash function, reseed of... (by jonnin)
Judge utf8 string is chinese
 
hello, i got a utf8 string, how could i use C++ regex to judge the string contains only chinese char...
[2 replies] Last: If you're looking for the number of code points in a UTF-8 string, it'... (by Cubbi)
January 2018 Pages: 1... 678910
  Archived months: [dec2017] [feb2018]

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