
please wait
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/cstring/strcmp/ What is the purpose for using fflush(stdout) i... |
Apr 8, 2019 at 7:35pm
[3 replies] Last: What happens if the flush of the stdout stream didn't happen? You wo... (by jlb)
|
by Horror
Problems with Loops
|
... |
Apr 8, 2019 at 7:27pm
[2 replies] Last: Duthomhas , I appreciate it! Thanks! This is my updated version of t... (by Horror)
|
by kyrresc
Address of..pointer
|
Hello, If you want to access the address of a pointer, i.e. the address where the pointer is stored (and not the address the pointer stores!). Is this the co... |
Apr 8, 2019 at 2:32pm
[4 replies] Last: yea they are correct (by Grime)
|
by Amidana
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 into my program, and I managed to remove the commas, replaci... |
Apr 8, 2019 at 1:08pm
[2 replies] Last: Once you're changed the commas to spaces, the easiest way to parse eac... (by AbstractionAnon)
|
by wowwhosay
need correction in my approach
|
Shlok and Sachin are good friends. Shlok wanted to test Sachin, so he wrote down a string S with length N and one character X. He wants Sachin to find the numbe... |
Apr 8, 2019 at 11:29am
[2 replies] Last: > Where is the approach failing ? No idea - we can't see your code. ... (by salem c)
|
by advancedip
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* counts ; // Allocate arrays in dynamic memory for (int i = 0;... |
Apr 8, 2019 at 11:05am
[8 replies] Last: The prof's code, run through valgrind. $ valgrind ./a.out ==8410== M... (by salem c)
|
by FreeSocks
Symmetrical Difference
|
Hello guys! So i'm trying to write a code where it checks 2 arrays that contain integers either positive or nagative ones. After that it should return the nu... |
Apr 8, 2019 at 10:53am
[5 replies] Last: for(i = 0; i < n ; i++) { if(a != b ) ... (by salem c)
|
by iamyiyaj
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 out with two decimal points? Like currency #include <i... |
Apr 8, 2019 at 6:39am
[1 reply] : #include <iostream> #include <iomanip> double retail_price( doubl... (by JLBorges)
|
by LeLorrain
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 compilation results on one module that I hope somebody would be a... |
Apr 8, 2019 at 4:52am
[7 replies] Last: @fiji885: Thanks, I changed it and the module compile without error! I... (by LeLorrain)
|
by jjordan33
I have stack overflow...
|
Is this not a proper delete function for a dynamic 2d array? FloodMap::~FloodMap(){ for (int i = 0; i < rows; i++) { delete map... |
Apr 8, 2019 at 4:21am
[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.youtube.com/watch?v=vVRCJ52g5m4 |
Apr 7, 2019 at 10:25pm
[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 the points x and y,and they should both be globally defined th... |
Apr 7, 2019 at 9:41pm
[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 head. I believe that I understand the concept of how it works b... |
Apr 7, 2019 at 2:13pm
[8 replies] Last: Is [adding to the head instead of tail] the better way to create a li... (by dhayden)
|
by redfury
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 using scope resolution operator. I am facing some issues in doi... |
Apr 7, 2019 at 1:40pm
[2 replies] Last: [quote=Enoizat]Anyway, that function doesn’t initialize ‘a’, it ... (by Grime)
|
by geouser
Fail State creates problems......why?
|
In the program below, look at function IF.... If I enter a letter(by mistake), the cin function, go into the failed state(I guess) make the 5 loops, displays th... |
Apr 7, 2019 at 12:28pm
[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 simultaneously, does each executable has its own global variable? ... |
Apr 7, 2019 at 7:07am
[2 replies] Last: Nice. Thank you. (by Vetzo)
|
by bondo100993
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 Calculator #include <iostream> using namespace std; in... |
Apr 7, 2019 at 4:57am
[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 month to complete but its hexapon. google it. let me know if th... |
Apr 7, 2019 at 4:02am
[4 replies] Last: I am not totally sure how to use enum yet, but i will look into it. An... (by closed account N8MNAqkS)
|
by goshko2
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 when I take a list item and add it to the tree I do not know h... |
Apr 6, 2019 at 10:54pm
[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, saturday, sunday, }; can we create a function da... |
Apr 6, 2019 at 10:41pm
[7 replies] Last: you can also do foolishness :) enum days { monday = 'M', // the ch... (by jonnin)
|