Beginners - April 2019 (Page 19)

by poggyQ
What is fflush(stdout) doing in this strcmp example program
 
So, I was trying to understnad strcmp listed on this site. http://www.cplusplus.com/reference/cstri...
[3 replies] Last: What happens if the flush of the stdout stream didn't happen? You wo... (by jlb)
by Horror
Problems with Loops
 
I’m doing a program where you ask the user to enter how many calories they burned the past five da...
[2 replies] Last: Duthomhas , I appreciate it! Thanks! This is my updated version of t... (by Horror)
Address of..pointer
 
Hello, If you want to access the address of a pointer, i.e. the address where the pointer is stor...
[4 replies] Last: yea they are correct (by Grime)
Separate String and put into Class
 
Hi :) I have an assignment to create a battleship replica via code. I'm trying to read my .csv file ...
[2 replies] Last: Once you're changed the commas to spaces, the easiest way to parse eac... (by AbstractionAnon)
need correction in my approach
 
Shlok and Sachin are good friends. Shlok wanted to test Sachin, so he wrote down a string S with len...
[2 replies] Last: > Where is the approach failing ? No idea - we can't see your code. ... (by salem c)
Can someone explain why I get the same output?
 
Is my professor's code wrong? Is my code right? //PROFESSORS CODE const int SIZE = 5; char* c...
[8 replies] Last: The prof's code, run through valgrind. $ valgrind ./a.out ==8410== M... (by salem c)
Symmetrical Difference
 
Hello guys! So i'm trying to write a code where it checks 2 arrays that contain integers either p...
[5 replies] Last: for(i = 0; i < n ; i++) { if(a != b ) ... (by salem c)
I am trying to have the answer come out as a decimal
 
When i compile, the answer comes out as a number with no decimal. How would I make the answer come ...
[1 reply] : #include <iostream> #include <iomanip> double retail_price( doubl... (by JLBorges)
Linux c++ compile errors that baffle me ...
 
For the first time, I am trying to write a program under Linux UBUNTU using gcc and I get some compi...
[7 replies] Last: @fiji885: Thanks, I changed it and the module compile without error! I... (by LeLorrain)
I have stack overflow...
 
Is this not a proper delete function for a dynamic 2d array? FloodMap::~FloodMap(){ ...
[15 replies] Last: .>>GreyWolf Your solution was absolute. I forgot to change back an ea... (by jjordan33)
8-Bits of Advice for New Programmers (The stuff they don't teach you in school!)
 
8-Bits of Advice for New Programmers (The stuff they don't teach you in school!) https://www.youtub...
[1 reply] : Thank you for this one. By watching it I tripped over a Numberphile co... (by MikeStgt)
pi
 
Hi, I am writing a program that has to calculate pi with montecarlo method. The arrow should hit th...
[11 replies] Last: Just in case someone wondered already weeks ago, today I found an erro... (by MikeStgt)
Linked List Program ->
 
I've been practising linked list for the past couple days and it's taking a while to stick in my hea...
[8 replies] Last: Is [adding to the head instead of tail] the better way to create a li... (by dhayden)
Diamond Problem solving by scope Resolution Operator
 
There are two ways to solve Diamond Problem in C++, one is by using virtual and the other is by usin...
[2 replies] Last: [quote=Enoizat]Anyway, that function doesn’t initialize ‘a’, it ... (by Grime)
Fail State creates problems......why?
 
In the program below, look at function IF.... If I enter a letter(by mistake), the cin function, go ...
[5 replies] Last: Thanks for the explanations http://www.cplusplus.com/user/Grey_Wolf/... (by geouser)
by Vetzo
Global variable - multiple instances running
 
Hello Forum, If an executable file has global variable, and you run the executable 2 times simult...
[2 replies] Last: Nice. Thank you. (by Vetzo)
Creating a simple geometric calculator that calculates the area of a triangle
 
Need help figuring out how to compile the second half of this code // Simple Geometric Calcu...
[4 replies] Last: SideOne would equal the triangle base length and sideTwo would equa... (by MikeStgt)
permenant headach
 
so here if something I am working on. its not done and im gonna estimate it will take me about a mon...
[4 replies] Last: I am not totally sure how to use enum yet, but i will look into it. An... (by closed account N8MNAqkS)
I have a big problem - I have to write the function that converts a one-time list into a double search tree that is balanced.
 
My problem is that I do not fully understand how to apply the rotation functions - more precisely wh...
[1 reply] : I don't fully understand the question. but this may help you... the B... (by jonnin)
Can I give an enum member functions, as if it were a class?
 
let's say we have: enum class day { monday, tuesday, wednesday, thursday, friday, sa...
[7 replies] Last: you can also do foolishness :) enum days { monday = 'M', // the ch... (by jonnin)
April 2019 Pages: 1... 1718192021... 24
  Archived months: [mar2019] [may2019]

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