General C++ Programming - October 2010 (Page 10)

friend operator problem.
 
hello folks of the C++ forum :) I'm having some trouble understanding the concept of a friend operator. *without* placing friend before an operator declarat...
[4 replies] Last: Hmm ok, thanks guys! (by xander333)
Garbage Collector in C++..
 
Hello guys, I wanna ask a question related with memory management. I many times allocate memory (for ex. int a = new int) but don't delete them in a C++ Class...
[4 replies] Last: Are all the functions declared correctly inside the class? Cause I see... (by nickburress2k2)
Is it a good idea to warp the new and delete with a macro?
 
In many famous libraries and frameworks, they encapsulted their memory alloctor and dealloctor, and replace the original c++ new and delete operator with macr...
[no replies]
by RC325
Copy Constructors & Abstract Classes
 
Hey all - Hoping you could help me understand something about copy constructors - specifically how to declare them. Lets say you have an abstract class wi...
[6 replies] Last: When I use one of your examples as a template for the classes I am try... (by RC325)
Multiple Inheritance and Function Problem
 
Okay so I'm having an issue with my game, nothing big, and I've patched it haphazardly. I would very much like to understand why it doesn't work though. The ...
[4 replies] Last: Oh wow... I apologize for wasting your time... I feel like an idiot. T... (by ultifinitus)
how can I determine the first day in the calendar
 
Hi I want to know how I can make function that determine the first day in the calendar (Hint: 1/1/1500 is Monday)
[2 replies] Last: http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week Edit: ... (by Athar)
Why the program is not looping?
 
I write this program to open a text file(example.txt) in a csv(output) file with a variable interval which is another text file (Length.txt). the program was su...
[1 reply] : http://www.cplusplus.com/forum/articles/16853/ (by Athar)
Problem with random numbers
 
Hey guys , as from what i read up , the function srand() and rand() are able to give u random numbers if they are being run one time only. What i am trying to d...
[4 replies] Last: Actually, you should use random_shuffle, because that's exactly what i... (by Athar)
Stuck at read/write from file to file
 
Hey guys, i am currently working on an assignment of an intro to c++ class, and i am being asked to read from a file called Bands.txt which has a list of band i...
[7 replies] Last: of course you will output the same line, if you aren't change it whi... (by ne555)
how to read textfile using arrays
 
hi,i am trying to use arrays to read text from a file on another location before sending it out byte by byte but i not very familiar with using arrays for my co...
[no replies]
by arcken
encoding
 
i have used loaded files before but not like this, can someone help I am trying to decode a file which is loaded by inFile.open the message is coded to wh...
[1 reply] : nevermind didn't see that there are things like isupper() and islower(... (by arcken)
Void convert assistance
 
Hey, I was trying to write a program that converted inches to cms and pounds to kg but I don't really know what to put into the void convert at the end. This ma...
[1 reply] : Please edit your post and put the source inside code tags. (by PanGalactic)
by Mish
Operator overload
 
Hi, I would need help for a very specific thing. It might not be very clear, but I'll try to do my best... I've got a class, and I want to use the subscript...
[6 replies] Last: Well, I used << and >>. I know the length of the buffer, so two poin... (by Mish)
function
 
what is nested function ? and what its use?
[1 reply] : http://lmgtfy.com/?q=nested+function&l=1 (by hamsterman)
by hotpil
static functions
 
I need make something like following: double CallF1(double (*fun)(double), double y) { return (*fun)(y); } class A { double a; public: static d...
[3 replies] Last: http://www.cplusplus.com/reference/std/functional/mem_fun/ (by moorecm)
Whitespace in Password Masking.
 
Newbie here. I cant seem to get the Space key working. The program still prints the space key as an asterisk. Here's my code: #include<stdio.h> #include<co...
[4 replies] Last: Sorry for that Duoas. It is just a sign of respect. Never meant that I... (by FrustratedSE)
by eparzy
State machine prog
 
Hi, I recently started to write a state machine, following the guidances from the book "programming game AI by example", from Mat Buckland. A few months ago I...
[2 replies] Last: Hey, thanks dude! The trick was to forward declare the State class i... (by eparzy)
Where to begin again
 
I'm currently getting back into C++ programming after a large gap and many changes in technology since my glory days of Motorola 68000 assembler code with the s...
[2 replies] Last: Just install a bunch of IDEs and decide which one you like. If you rea... (by Darokthar)
Trouble With a for Loop
 
Thank you for looking at this. So what I think I'm trying to do here is Ask for an input of a how many times that number is going to be compared to Coun...
[4 replies] Last: It's hard to follow what you are trying to accomplish here. One reason... (by davgarza)
by natie
deleting lines (??)
 
I want to ask something else. If I have a program which displays only lines (which are inputs from the keyboard), I mean for example smthng like this: 1>blah...
[3 replies] Last: LittleQuick++, if he or she were an l-value. Don't use system... http... (by Albatross)
October 2010 Pages: 1... 89101112... 23
  Archived months: [sep2010] [nov2010]

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