Beginners - July 2012 (Page 42)

method and property on OOP?
 
hey guys, can you explain to me what method and property on OOP is? i search it on google, but still have no idea. can you explain it to me with the example of ...
[3 replies] Last: C++ has no "methods" , nor does it have "properties" . In C++, they ... (by closed account zb0S216C)
How to circle numbers
 
I´m working on a problem and part of the problem is to find the average of an array and i find it but it comes out with a lot of decimals. So how can I circle ...
[4 replies] Last: How do you get the output next to the code? (by Script Coder)
by fg109
Timing program execution?
 
What is a good way to do this? Right now, I'm doing this: #include <iostream> #include <ctime> #include <iomanip> using namespace std; int main...
[5 replies] Last: $ time ./program.bin put a Sleep between the timings and you will ... (by ne555)
Trouble with definitions in header file
 
Hello, in my project I've created header file, and while compiling compiler shows an error. I have no idea how to fix it. Functions.h #ifndef FUNCTIONS_...
[3 replies] Last: You do not want to be using namespace in any header file because it ... (by closed account zb0S216C)
How to program a grappling hook?
 
Could anyone help me with programming a grappling hook for a 2d game. Only...I'm a bit clueless so tips would be very helpful.
[10 replies] Last: i have been searching for a nicer way to do this and now i have a prog... (by gelatine)
fflush needed?
 
Guys, Do I really need fflush in this c++ piece of code? ofstream Records; Records.open("Records.txt", ios::app); cout << "Enter Student's First N...
[1 reply] : IIRC you can't flush input streams. (by ne555)
reference to type/object
 
First of all, I'd like to say hi to everyone as I am new to this place- so Hi! As a newbie to C++ I have some lame questions, that I couldn't find answers to ;...
[2 replies] Last: I am so grateful! If there was a "thank you" button, I'd set up a bot ... (by BR41NFCK)
syntax for "pointer-to-member" as return value type
 
I am so close to understanding pointer-to-member, but I'm lost on the syntax to have it as a return value type. Using a typedef I managed to make it work. I...
[13 replies] Last: Thanks, that last example makes it even more clear. I messed around so... (by Prestissimo)
Iterating through a multidimensional array
 
I'm working on a program that will include a very basic "map editor" of a sorts. (The "map" is actually a 2D integer array of 1's and 0's, 1 = wall, 0 = open sp...
[3 replies] Last: Ahh... Stupid mistake there on my part :) Thanks for the help. (by Raistlin121)
Function
 
How do the functions mid() and lenght() work in C++ ???
[4 replies] Last: If you mean mid$ from Basic, then you might want to look at substr() i... (by kbw)
switch
 
#include<stdio.h> #include<conio.h> main() { int i=1; switch(i) { ...
[2 replies] Last: oh yes..i had forgot that without break, all following cases are execu... (by vgoel38)
How to Read All Lines of Input File as String
 
I am working on the first part of a project for my introductory c++ course. I am writing a program where an entire file must be read by the program. The code as...
[2 replies] Last: you can also do it as ifstream ifile; string str; ifile.open(FILENAM... (by eklavya sharma 2)
what does the return function do in this case?
 
#include <iostream> using namespace std; class Cvector { public: int x, y; Cvector () {}; Cvector (int, int); Cvector operator + (Cvector); }; Cv...
[1 reply] : Because temp is object of Cvector class and we must need to return Cve... (by HiteshVaghani1)
Program Restart and Name with Space
 
I have a problem and I can't seem to find a good solution. I'm just beginning in programming but I had this two problems where I can't solve. The problem: 1....
[3 replies] Last: I see, thanks! Got it working now. (by TheBlackCrow)
by beakie
Non-filled circle?
 
This function in windows GDI draws a filled circle... Ellipse (hdc, 50, 50, 150, 150) ; How can I draw 2 overlapping circles without the circles being f...
[1 reply] : Shapes are filled with the currently selected brush. If you don't want... (by Disch)
by CjKen
Project Euler #3 Solution Crashing
 
This is the problem from projecteuler.net (it's one of the first ones) The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor o...
[8 replies] Last: thanks! (by CjKen)
fstream Problem
 
Hello, I am very new to c++ and all I am trying to do is use the fstream to open a .dat file and interpret the 14 different lengths to the program. The problem ...
[5 replies] Last: Oh alright - I finally got it! Thank you guys! :) (by ColonelCluster)
Please hELP!Columns to adjust accordingly
 
--
[1 reply] : Well, you obviously know that the strings have a length() function. J... (by fg109)
Need help with a loop
 
I need help with a loop that will take and array and exchange the outermost pair of numbers, then the next pair of numbers,etc. basically need it to take an ...
[10 replies] Last: The syntax is off, you've declared array twice and you've introduced y... (by kbw)
Alternate Realities.
 
Just wanted to comment on the paradox in the thread about counting characters. Ironically, My post and fafners posts were so close in time, that they had to ...
[2 replies] Last: Two people posted in a thread at exactly the same time. The result wa... (by htirwin)
July 2012 Pages: 1... 4041424344... 54
  Archived months: [jun2012] [aug2012]

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