Beginners - August 2017 (Page 9)

Priority Queue reheapUp function not ordering correctly
I'm trying to write a function to maintain order in my priority queue however it doesn't seem to be working. The program compiles fine but i dont get the output...
Aug 17, 2017 at 7:31am
[2 replies] Last: yeah! After looking over my notes again i was confusing the element an... (by kingkush)
dynamic_cast and polymorphism (inheritance + virtual functions) in order to generalize different types under a common base-type
I'm learning about "dynamic_cast" and wondering why is useful to have this type of cast and I ended on this thread: https://stackoverflow.com/questions/2228216...
Aug 17, 2017 at 6:37am
[11 replies] Last: [quote=keskiverto]Obviously one cannot call them via Base* Hi, I wa... (by TheIdeasMan)
When to use try-catch and when to use if-else?
Hi. I wonder when to use try-catch and when to use if-else, I think they both achieve the same result.
Aug 17, 2017 at 1:41am
[4 replies] Last: Thanks FurryGuy (by omer123)
New to Functions()
I'm not really sure if this is how you use functions. There are errors saying "too many arguments to function 'int OutArray'" #include<iostream> #include...
Aug 17, 2017 at 12:09am
[7 replies] Last: Thanks for the help guys. (by ThatGrayRock)
Read input file into array using while loop?
Hello, I'm trying to read some numbers from a file. The last line of the file is a sentinel, -1. I am supposed to write the arrays into another output file late...
Aug 16, 2017 at 8:36pm
[6 replies] Last: It worked, thank you lots jlb!! (by hihihello)
text file
I am writing the text file in different lines but when read my file it shows in same line #include<iostream> #include<fstream> using namespace std; voi...
Aug 16, 2017 at 7:01pm
[3 replies] Last: And yet you have not made any of the changes I suggested. (by Duthomhas)
by Tobruk
Identifier not found even with forward declarations
I have a project consisting of several files. This is their interdependency: Header interdependencies main.cpp -> all below io.h -> classes.h classes.h -...
Aug 16, 2017 at 6:38pm
[2 replies] Last: For future users stumbling upon this thread and looking for solutions,... (by Tobruk)
Is graphics.h outdated?? and if yes then is there any other graphics library
Is graphics.h outdated?? and if yes then is there any other graphics library??
Aug 16, 2017 at 6:05pm
[2 replies] Last: Sluggishness has nothing to do with OpenGL and everything to do with d... (by Duthomhas)
Error in Class example
Hi everyone, I'm trying to display the sentence "my name is james" in main() using class. But I could not figure out what's giving me error in this code. Can so...
Aug 16, 2017 at 5:31pm
[2 replies] Last: Ohhhh i see! Thank you so much for the help arbwok! :D (by MeganFox)
Im noob
Write your question here. One of my project has a question and it has 6 different option and i want the user to select 2 option only
Aug 16, 2017 at 3:52pm
[1 reply] : The secret to getting good help is asking good, detailed questions. d... (by jonnin)
How to resolve the bugs
Hi, the numbers seems to be jumper up after I call out the loops. How to make sure that the random numbers run accordingly with the loops? #include<iostr...
Aug 16, 2017 at 2:58pm
[8 replies] Last: Hints: #include <ctime> #include <iomanip> #include <iostream> void... (by Enoizat)
by muratk
<fstream>
Hello , i am new on this <fstream>, i want to make a program which will asks the exact key word from the user , if user types it wrong ,it should give error.Wha...
Aug 16, 2017 at 2:10pm
[5 replies] Last: Concept of the program , it should open "songs.txt" file , if user t... (by Chervil)
Gathering information
I am working on a program which allows the user to enter information about a student, the inputs are: surname, last name, courses. So an example of how it would...
Aug 16, 2017 at 1:08pm
[2 replies] Last: Works with that piece of code, cheers! However it only types out the ... (by cactusinapot)
by dubley
Calling a function that takes an array as argument
This is an adaption of a Chapter 7 review question from Stephen Prata's C++ Primer Plus. I want to output the maximum value in the array as calculated in the fu...
Aug 16, 2017 at 12:28pm
[3 replies] Last: Thank you both very much. The error message was: syntax error: ']' (by dubley)
Trouble understanding book example (functions)
Hello all, I am having a hard time understanding this particular program presented in my book. I tried my best to write it out but I don't understand the logic....
Aug 16, 2017 at 10:34am
[5 replies] Last: Makes much more sense now, thank you! (by Bayan Khorshidi Berkeley)
by Wudang
Freeing memory
Hello, i am studying this part of Apache module mod_spnego code LPCSTR authorization_header = apr_table_get(request->headers_in, "Authorization"); ...
Aug 16, 2017 at 7:06am
[2 replies] Last: Have you bothered to check the documentation? https://apr.apache.org/d... (by kbw)
Undefined reference errors
Hey, I'm getting some simple errors, and was wondering if someone could help me out. I've also got a question about header files. When and where should they b...
Aug 16, 2017 at 3:13am
[8 replies] Last: @ JeremyBenson11 Just so you know, C++ system header files such as s... (by TheIdeasMan)
Sorting an array in a non-ascending order
I wrote a program which generates random numbers between -10 and 100, now I need that sorted. To generate the numbers I used an array, now I don't know wher...
Aug 16, 2017 at 12:33am
[19 replies] Last: Are you learning C or C++? The C++ streams are much safer than the C-s... (by jlb)
Why won't this run properly?
I created a little game based off of a video by MakingGamesWithBen. It was a challenge video though, so I didn't copy any of his code. I feel like my code shoul...
Aug 15, 2017 at 6:22pm
[3 replies] Last: Line 33: You have no exit from your loop. You will never reach line 6... (by AbstractionAnon)
What happen when an object is not correctly initialized?
I wanted to participate on this thread: http://www.cplusplus.com/forum/beginner/220125/ and I run into a new topic "Reading information from a file" So I was ...
Aug 15, 2017 at 4:46pm
[5 replies] Last: I wonder if in this case can an implicit conversion take place for "i... (by AbstractionAnon)
August 2017 Pages: 1... 7891011... 17
  Archived months: [jul2017] [sep2017]

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