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

Dynamically Allocated Array Issue
 
So, I need to be able to pass a parameter used by function addElement and add that element into a dynamically allocated array. But for some reason when I am try...
[2 replies] Last: Peter87 yeah I ended up figuring almost everything out last night. I j... (by nwilli9)
Parallel Technical Standard
 
Any C++ compiler on Windows 10 that can compile a C++ 17 program that uses Parallel Technical Standard features please? http://en.cppreference.com/w/cpp/expe...
[10 replies] Last: Thanks for the information about MS VC++ 15.6. (by AlexCantor)
seekg or seekp
 
So, I have a binary file that contains char array information than float information. And I need to read and sum only the float numbers. How can I jump the char...
[3 replies] Last: I can't really say for sure without the code which actually writes the... (by mbozzi)
by dean
Why doesn't Return Value Optimisation (RVO) break the function calling convention?
 
As stated in various sources, notably the holy standard, a compiler can prevent, under certain conditions, copying an object created and returned by a function ...
[5 replies] Last: I think I now understand your point. That would be like a compiler imp... (by dean)
Visual Studio 2017: how i add a persistence directories?
 
on Visual Studio 2017, for use DirectX, i must add libraries on Project Properties. the problem is when i create a new project, i lose the directories. how can ...
[7 replies] Last: if i did wrong, i can reinstall it or maybe reset all options ;) (by Cambalinho)
how to read a txt file and store it into an array without numbers and punctuation?
 
I'm working on a program that can read a text file and analyze the percentage of each specific words. I've finished all of the functions, but have some trouble ...
[1 reply] : Duplicate of http://www.cplusplus.com/forum/beginner/228901/ (by JLBorges)
User Defined Array size
 
Hey Guys!, Beginner programmer here. Ok so straight to the point, I'm building a simple bubble sort program and i am implementing a user defined array size. ...
[7 replies] Last: Selection sort is the most natural of all sorting algorithms — it is... (by Duthomhas)
by bsjkb
C++ function refactoring help
 
- i have an array of bits ex: 1,2,3,4,5...,10 - for every bit the following function is called: do { if (..) { return_val= performsometh...
[2 replies] Last: it is difficult to have an array of bits. Most systems can't handle b... (by jonnin)
by stav
(dis)advantages of include "" ?
 
Hi i've always been including my own h files like so include <> As that allow me to move them anywhere i want, as long as i just remember to add it to the in...
[1 reply] : The only difference is where the compiler looks for files first. #inc... (by Duthomhas)
Linking error
 
I am trying to write simple LinkedList implementation with List interface and unit test. When I am trying to run my code in CLion I got following errors: Und...
[16 replies] Last: Is it bad? No. do people do stuff like that in C++? Yes There's al... (by kbw)
using a function to add or subtract values in an array
 
I'm trying to create a function that, when called someone can input a number that will increase the number of parts in a bin, or decrease depending on which fun...
[1 reply] : void add2arr(int value, int* ip, int index) { ip += value; } //... (by jonnin)
function pointer error
 
i keep getting the error " expression must be a complete object type" at the line where it says "out = algo [in ];" i do not know why do to not working with p...
[2 replies] Last: Thanks I'll try it see what happens (by ReaperSoul)
How to Align Numbers
 
I'm trying to line up the cost of the drinks, as well as the number left in the machine, I cant seem to figure it out using setw(), any help would be greatly ap...
[8 replies] Last: Thank you both for the help i sincerely appreciate it, but yes Thomas1... (by kSzabo99)
function that takes type function
 
i'm looking to create something like this but i don't know how to pass a function to another function and i cant figure it out from anything online void func...
[7 replies] Last: [quote=ReaperSoul]if anyone could give me an example for what im tryin... (by lastchance)
return value type does not match the function type
 
I am playing catchup for a C++ class I am taking. I was able to get the errors from 12 down to the final two which appear below. return value type does not m...
[7 replies] Last: That worked! Thanks! (by solitudetree)
Doubts about classes
 
What is a class?
[4 replies] Last: Please, could you help me with the problem? Do you have a question m... (by cire)
Problem on using file data in the main ! Thanks
 
Hello, I really need your help , so I have a project where I have two classes Personne and Patient, and where patient inherits from personne, also I have a ...
[no replies]
by slei
static member variables and inheritance
 
I have following problem, normally when you have the same static in base and derived, you'd end up with 2 different statics: class A { public: static const c...
[6 replies] Last: https://stackoverflow.com/questions/10502114/how-to-enforce-a-static-m... (by slei)
Error while parsing USD and $ amounts using money_get<>
 
I am getting an error while parsing USD and $ amounts using money_get<>. #include <iostream> /// cin, cout #include <locale> #includ...
[5 replies] Last: There is a better way to terminate the loop when reading money amounts... (by SSteven)
Is there any thing wrong in this vector code ?
 
I am tying to delete those customer whose age is 15 So entered the data as 12,13,14,15,16,15,17,15,18,15. Size is 10 and capacity is 10. After deleting the c...
[1 reply] : Your imminent problem is that your code essentially does: Foo* foo = ... (by keskiverto)
January 2018 Pages: 1... 34567... 10
  Archived months: [dec2017] [feb2018]

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