General C++ Programming - March 2016 (Page 6)

constexpr vas inline??
 
Hi, Yes, the question sounds silly, I know... But, nevertheless I need to ask it: because: say we have constexpr double square( double x ) { ret...
[5 replies] Last: Hi, I might attempt to answer this :+) In this link, a constexpr fun... (by TheIdeasMan)
help please. vector subscript out of range error.
 
I am writing this function for merging two vectors in order. each vector should be in order already before merging, so check that in the beginning. after that...
[3 replies] Last: sorry guys (by dogsu1230)
Outputting a zip code as a bar code format
 
Hello, I've been asked to write a program that outputs a mailing label for a given address. The zip code needs to displayed as a "bar code" at the bottom of...
[5 replies] Last: Thank you a ton AbstractionAnon! (by jjkrynock)
by mrtzz
Back-Pointer
 
Hey, i'm lacking a proper search term for my problem, so i hope this question hasn't been answered already. So, i have a class called Parent.On instantiation it...
[4 replies] Last: @doug4 yes that makes sense, thanks! If p would be a shared_ptr to par... (by mrtzz)
Nested Looping Producing Bad Results
 
I was instructed to create a program that uses nested loops to get 4 quiz scores from any amount of students, output them into a file, and then input them back ...
[8 replies] Last: AHHH. Thank you so much!!! I changed the for loop to this: for (int ... (by raiiiny)
recording vidio stream from vlc
 
hi everyone, i want to do a c++ program that receive a stream from vlc and save it in a disk(D:\\vidéo.mp4)i supose i have to use udp sockets to get this stre...
[no replies]
Finding Username Password and ID in .txt
 
Working on the log in system for my Text based RPG, where the user can set their username, password and IG Name which are all saved in a plain text file. I need...
[no replies]
C++ code
 
Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day...
[3 replies] Last: Your for loop is an infinite loop and your braces aren't balanced. Thi... (by booradley60)
help me with multiplication of two matrix
 
whats wrong with this program?this program should take all of things in one scanf but its only takes matrix 1.i confused #include<stdio.h> int main() { int ...
[1 reply] : What do you think a construct like this does? for (i = 0; i<m; i++)// ... (by coder777)
by ayati
generic declaration of and acess to member variables (1,2)
 
Hi everyone, I have a parameter N known at compile time, and a class C (from container) that contain N member variables of different types. My final objective...
[27 replies] Last: > till now the code does not seem to have lot of use. No, it was quit... (by JLBorges)
by kbw
clang: copy elision warning
 
In recent times I've taken to writing code like: std::string assing(const zmq::message_t& msg) { std::string str((const char*)msg.data(), msg.size()); ...
[8 replies] Last: std::move is implemented as a type cast, but that doesn't mean it does... (by kbw)
by denz
Please can you assist.
 
A bookshop gives discount to customers as follows:  Students get 10% discount,  Book dealers get 12% discount and  Pensioners get 15% discount.  Al...
[3 replies] Last: Thank you so much guys, this helped me out big time. Much,much appreci... (by denz)
by Beez
Inputing data from .txt file into array
 
I posted on stack overflow, but everyone just downvotes my questions as I am not a seasoned programmer. I will try to lay it out in a better format. I'm trying ...
[4 replies] Last: cout << "I have just read in the strings " << boys << " and " << gir... (by Moschops)
by Beez
Searching Array to check for matching string
 
The user inputs a name they want to search for in my arrays if it matches one in the list I want it to output the location in the array that the name is located...
[5 replies] Last: Your function has no return value if the string is not found, so you c... (by Moschops)
Understanding the vectors
 
// constructing vectors #include <iostream> #include <vector> int main () { // constructors used in the same order as described above: std::vector<i...
[1 reply] : what is *it, in the above program, it has not even declared... Yeah... (by TheIdeasMan)
Variadic introducing an static for each typename passed
 
Hi, Having the following variadic template definition: template<typename...Tuples> struct expand; template<typename T, typename...Tuples> struct exp...
[1 reply] : #include <iostream> template < typename... > struct expand ; templa... (by JLBorges)
Loan Issue
 
Super frustrated. I'm trying to determine how to do this incremental loan calculator. These are the requirements. Input should be: -Loan. -Amount of ...
[1 reply] : Hi, On line 31, the compiler does integer division before implicitly ... (by TheIdeasMan)
Help with code, please. C++ Programmer's Notebook 2nd Edition
 
I am studying from a book : C++ Programmer's Notebook 2nd Edition by Jim Keough and John Shapley Gray. I am having a problem with pages 438 - 439 : Using a Lin...
[5 replies] Last: Yes exit the loop if the count gets to big, however n increments in a ... (by josheir)
Help with strings
 
jhggh
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
March 2016 Pages: 1... 45678... 23
  Archived months: [feb2016] [apr2016]

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