Beginners - May 2015 (Page 12)

Visual Calculation?!?
 
Hello dear Huntsmen's, I have evolved a bit and here is what I want to consult about: http://share.pho.to/9OWrP this code is "all right reserved" ;). Okay no jo...
[no replies]
plese help
 
Write a program that asks the user to enter 5 numbers and display the numbers in descending order in iostream and cannot use loops. Pls help!!!
[3 replies] Last: The link was because you posted about the same topic twice. If you... (by Codermik)
Peer review: Template singly linked list using unique_ptr
 
Sorry for the long code post: Class template<typename B> class linkedlist{ public: //linked list struct struct node{ B x; unique_ptr<node> next; ~n...
[5 replies] Last: > As the name imply the intention is that you have only one pointer at... (by JLBorges)
Delete the last two characters in stringstream
 
Hey guys, is there any way I could delete the last two characters in a stringstream? I'm working on a tree assignment and was wondering if there was an easy way...
[17 replies] Last: I'm working on a tree assignment ... A rather belated question, but ... (by andywestken)
what this code means ?
 
hi ! ^^ I am starting to learn C++ these days.. but I can not understand codes below.. This code is builded with no problem.. But I can not understand the m...
[2 replies] Last: Besides that this is an enum Class as mentioned there's nothing confus... (by cnoeval)
Platforms are not always solid.
 
I got the problem with the platforms. Sometimes the platforms are solid. But sometimes the character just falls through it. It's about sections with the com...
[3 replies] Last: I solved the problem by making the the gap bigger. So instead of thi... (by oligranaat)
by MRQ1
Object Oriented Programming
 
I have seen a lot of people saying that C++ is quite a complex language to actually learn the object oriented paradigm. I have come to the conclusion that the g...
[12 replies] Last: you should try yourself first. you should see others code when/where ... (by andywestken)
Descending order
 
Can I have some hint how to write a program that will arrange 5 numbers in descending order using C++.tq
[1 reply] : Look up bubble sort :) http://mathbits.com/MathBits/CompSci/Arrays/... (by Codermik)
help with understanding code
 
Write your question here. can someone please explain to me how this works below? bool compare(const CBox* pbox)const bool compare(const CBox* pbox)const...
[5 replies] Last: Thanks very much for the help. (by kan2015)
by Aye
Urgent!!
 
I have an assignment about quick sort and insertion sort and i didnt understand it all :'( !! sort an array of 10,000 elements using the quick sort algorithm...
[2 replies] Last: hi read these: https://en.wikipedia.org/wiki/Quicksort https://en.wik... (by anup30)
by jow123
please solve this
 
Write your question here. #include<iostream.h> int main() { int a,b,c,d,e,ch,r; float result; cout<<"Jowel's Calculator \n"; cout<<"1. Addition \n"; ...
[1 reply] : Remove the semicolon after the switch(ch); // <- misplaced semicolon ... (by coder777)
Compute Cube Number
 
Hi .. The following is my beginner code that compute cube number n^3, i already use n1*n1*n1 to compute it, is there any function in C++ to do that directly ? ...
[1 reply] : You could use std::pow. http://en.cppreference.com/w/cpp/numeric/math... (by Peter87)
delete question
 
Do you have to call a destructor in this situation? class Data { public: Data() { for (int i = 0; i < 1000; i++) { int* x = new int; ints.push_ba...
[2 replies] Last: Ok, thank you! This makes sense. (by kong288)
Console crashes upon passing dynamically allocated array as a parameter
 
Hi, I wrote a program to simulate rolling dice with input number of dice, sides, and rolls, and ask the user if they want to display a histogram of the sum at t...
[1 reply] : Doesn't crash for me. What input are you using? (by Hippogriff)
SDL text to screen
 
I would like to render text to the screen. The renderText function gives me a bad access error. I feel like its conflicting with my render object...any ideas? ...
[1 reply] : Been a long time since I used TTF with SDL but what makes you think it... (by Hippogriff)
Pointer
 
What is the problem with this code?It Doesnt show my display ?? #include<iostream> #include<string> using namespace std; class store{ int i...
[2 replies] Last: Txxxx jamess (by rahul820)
by ZeHgS
Are templates the best option? If so, is this the correct syntax?
 
Hello! So I have this: //base class class InterfaceItem { public: //iterates through m_SubItems vector looking for an item wi...
[1 reply] : In the end I managed to use template functions. I found out the reason... (by ZeHgS)
Help with derefrence member.
 
Why do you need to declare a pointer? Can't you just assign the pointer without declaring it to a type. Like this int * p; Why do you have to declare a ...
[1 reply] : This video is good. https://www.youtube.com/watch?v=h-HBipu_1P0&list=... (by Bdanielz)
Calculating Frame Rate
 
I am having trouble calculating frameRate. Can someone please help me with my code. :/ I am getting 118,521 FPS....does this sound right or am I doing somethin...
[1 reply] : The framerate is F rames P er Second , which is the number of times... (by Duthomhas)
Choosing between the two(Binary Tree)
 
I want my output to go on like this: You: Hi Hello How are you Choose: a Me: Hello You: How's life? I'm good lel Choose: b Me: lel My current ou...
[8 replies] Last: I fixed it! :D #include<iostream> #include<stdio.h> #include<Windows.... (by Vandalism)
May 2015 Pages: 1... 1011121314... 40
  Archived months: [apr2015] [jun2015]

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