Beginners - February 2017 (Page 34)

setw() help
Write your question here. When entering a bill amount in of over $100.00 all of the decimals line up correctly. If entering a bill amount of say $75.26 the f...
Feb 4, 2017 at 4:41am
[3 replies] Last: Hi, Investigate the std::left and std::right iostream manipulator... (by TheIdeasMan)
DEV C++ DIRE NEED OF HELP
Hello Guys, I know this is too much to ask for but not getting sleep for 3 days is also too much for me. We have been assigned to make a dev C++ proj but I dont...
Feb 4, 2017 at 3:35am
[no replies]
void* generic pointer
The following code is wrong. I am trying to write a simple generic function using C language syntax,then invoke that function from main(). My goal is to be able...
Feb 4, 2017 at 1:31am
[2 replies] Last: void fill_array( void* array, size_t array_sz, size_t element_sz, con... (by JLBorges)
Help with Programming please
I have tried running my code, and I think I have set it up right. However it does not wrong. I was wondering what is wrong with it. Here is the prompt: Prompt...
Feb 4, 2017 at 12:24am
[3 replies] Last: Thank you all very much it helped! (by jollyholly11)
Gambling Age Restriction Code
Hey all, I am writing a gambling dice code but I just realized before the game starts I have to ensure that the user is 21 or above. I am not sure how to do th...
Feb 4, 2017 at 12:04am
[2 replies] Last: thank you! can't believe i didnt think of that (by boxter126)
by NICE8x
Return Error
I just can't get this function to work. Right now it won't compile. I just cannot figure out why it says the variable row is uninitialized. Am I doing the po...
Feb 3, 2017 at 10:41pm
[3 replies] Last: Any idea why this wouldn't work??? // REQUIRES: mat points to a val... (by NICE8x)
by wolfv
How to figure out C++ syntax from documentation?
Both of the following getline() examples have the same output and work as intended. The first example if of c style getline() as described in http://www.cplusp...
Feb 3, 2017 at 10:01pm
[2 replies] Last: Now I see, getline() can be one of several functions with the same nam... (by wolfv)
Array of fixed length circular buffers
Hi all, If I want a std::array of size 3: std::array<int,3> y1; If I want a circular buffer of size 10: boost::circular_buffer<int> y2(10); If I want a std...
Feb 3, 2017 at 8:21pm
[1 reply] : The size of boost::circular_buffer is not part of the type so I guess ... (by Peter87)
by wolfv
stringstream::getline()
This page shows that stringstream has a getline() method: http://www.cplusplus.com/reference/sstream/stringstream/ But when I try using it, this compile error...
Feb 3, 2017 at 8:07pm
[2 replies] Last: That fixed it! Thanks cire. (by wolfv)
by MAK001
Boolean array to hold ASCII characters
I need to make a guesses array (like a vector, but without methods) that holds a Boolean for each ASCII character. I am new to c++ and have no idea on how to ...
Feb 3, 2017 at 7:30pm
[3 replies] Last: it just need to be a bool array that holds ascii characters An array... (by AbstractionAnon)
by wasey
Reference Function Returning Garbage Value
Hello, I'm able to get my code to compile, however my void function is returning an output of 0, 0, 32766 no matter what the integer input is. I'm supposed to s...
Feb 3, 2017 at 7:16pm
[1 reply] : Lines 14-16: a,b,c are uninitialized variables (garbage). Line 22: ... (by AbstractionAnon)
Can someone Explain with comments The code And Working of Static Stack
Array Implementation of Stack
Feb 3, 2017 at 6:53pm
[1 reply] : http://lmgtfy.com/?q=%22C%2B%2B+%22+%22array%22+stack+implementation (by mbozzi)
by wasey
Unable to send value from function back to main
I'm not sure where my error is, can someone steer me in the right direction? I have to calculate the distance an object travels due to gravity based on how long...
Feb 3, 2017 at 3:41pm
[3 replies] Last: Thank you all, I was banging my head on this one. Appreciate it! (by wasey)
Array of circular buffers
Hello all, I'm aiming to make a large program that scans through a lot of simulated data. In order to do this, I'm using circular buffers (or deques). However,...
Feb 3, 2017 at 2:38pm
[1 reply] : boost::circular_buffer is a standard library compatible sequence con... (by JLBorges)
Need help with few programs
Hello all, so recently I have started programming with C++ at college , it's not the main thing in my study program but it's for general education.So I have few...
Feb 3, 2017 at 2:28pm
[1 reply] : Start with a bare minimum program: Get a number from the user and prin... (by dhayden)
What does retun answer do?
I'm new to c++ and watching tutorials and I want to know what does return answer do in this code do exactly? The code runs normals even if i skip it. Please can...
Feb 3, 2017 at 12:30pm
[2 replies] Last: what does return answer do? It copies/moves the content of the local ... (by coder777)
Need help with accessing an array that hold pointer to the DATA
while (in >> p ) { i++; } this is where im having trouble. i know that p is an array that hold the pointer to the DATA but i dont know the synta...
Feb 3, 2017 at 10:18am
[3 replies] Last: In your original code (line 66) you create an array of pointer to DATA... (by coder777)
Unsorted Link List Delete Function Error
Whenever i use deleteitem() function my compiler point me to the show() function Header File "Node" struct Node { int data; Node* next; }; Heade...
Feb 3, 2017 at 8:55am
[3 replies] Last: Thnx (by bird1234)
pointer pointer pointer
hey guys, here is a code of pointer #include <iostream> void test(int* i) { *i = 2; } int main() { int x = 3; test(&x); std...
Feb 3, 2017 at 6:42am
[2 replies] Last: thanks, been looking for that in a long long time (by Flaze07)
by NICE8x
If Statement with Pointers
I'm going to make a new post so it is clear what I am asking
Feb 3, 2017 at 4:51am
[1 reply] : Assuming array contiguity, just do some pointer arithmetic: std::div(... (by mbozzi)
February 2017 Pages: 1... 323334353637
  Archived months: [jan2017] [mar2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.