|
J-Dogg306 wrote: I was wondering if anyone knew the proper way of referring to a function of a specific class...
Functions within a class are referred to as a method.
J-Dogg306 wrote: are you supposed to use MyClass::myFunc() ??
That's acceptable.
J-Dogg306 wrote: In code, the double colon is used to refer to static members, and these functions are not static... although it's also used for all function definitions outside the class definition...
Technically it's called the scope-resolution operator.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Functions within a class are referred to as a method.
Technically, yes... and I know this is important to Java people... but don't a lot of C++ programmers still like the term function?
Would I be correct in saying that function refers to C++ routines in general, of which method is one type? The fact that you said "Functions within a class are referred to as a method"... and the fact that people use the term "member function", seems to imply that this is the case...
The reason I ask is because I'm writing a section of the report that discusses routines that the program registers with an API that it uses, to be automatically called on certain events. Some are static functions, some are members of classes, and I'd like a generic term to refer to either. It's a section too early in the report to burden the reader with what belongs to a class and what doesn't... the reader doesn't even know the names of classes yet... the section is just meant to point out where to look to find the code responsible for certain things, so the reader can follow along in subsequent sections, when I actually do delve into details... at this point in the report it's important for the flow of things that I use a consistent term.
Oh and I'd rather not use "routine"... sounds too general.
Cheers.
|
|
|
|
|
J-Dogg306 wrote: ...but don't a lot of C++ programmers still like the term function?
Yes, I use both interchangeably all the time.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi all,
how can i recognize a shortcut or a hypertext on file?
thanks.
MK.
|
|
|
|
|
Your question is a bit unclear. What file?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
a text file. Ex: .doc, .txt, etc...
|
|
|
|
|
Ok, what about them?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello all people,
I need make a application that update the BIOS information:
Vendor name, BIOS Version, BIOS build date and more.
I used to know that I have to use the 52h function. I don´t know how complex is this task.
That app must run on DOS.
I really need that. Can be Basic, QBasic, Fortran, Cobol, Assembler, C/C++. Any DOS suported language!!
thanks all!
|
|
|
|
|
It's only been 61 minutes since you last posted this question. Courtesy dictates that you should at least wait 24 hours before getting overly excited and re-posting.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
On the bright side, he did wait an extra two minutes before doing the same on the General Discussions forum.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
the question is:
Employee in Green Grocery Mart are paid each day based on the number of hours worked and an hourly rate of RM15. Construct a clss named Employee that has data members to hold the Name, hoursWorked and salary. The class should have member functions.
- constructor to initialize the object
- destructor to destroy the object
- set and get function for the employee name
- set and get function for the hoursWorked
- salaryPayment to calculate the pay for the employee
- show data to display the Employee information which are name, hoursWorked,
and salary
* please help me...i need it as soon as possible (urgent)
* i need the coding for the problem...
-- modified at 14:25 Monday 13th March, 2006
|
|
|
|
|
head dezee wrote: - constructor to initialize the object
Yes.
head dezee wrote: - destructor to destroy the object
Yes.
head dezee wrote: - set and get function for the employee name
Absolutly.
head dezee wrote: - set and get function for the hoursWorked
a Necessity.
head dezee wrote: - salaryPayment to calculate the pay for the employee
No way José!!
head dezee wrote: - show data to display the Employee information which are name, hoursWorked, and salary
You don't say !
so now, have you done anything for your homework ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
head dezee wrote: * please help me...i need it as soon as possible (urgent)
Sure. What time does your class end? If I get stuck doing this for you, can I ask the instructor for help?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
we need to resolve it within 2 hours... please...i need your help...now i'm not in the class....
* i need the coding for source file 1 , source file 2, and header file.... pleaseeeeee
this is the coding that i have make...i dont know why it have error
------------------------------------------------------------------------------
//employee.cpp
#include<iostream>
#include<string>
#include"Employee.h"
using namespace std;
Employee::Employee() // default constructor
{
EmployeeName=0;
hourWork=0;
}
Employee::Employee(const char NamaPekerja, double hour, double gaji)//overloading constructor
{
NamaPekerja=EmployeeName;
hour=hourWork;
gaji=salaryPayment;
}
Employee::~Employee()//destructor
{
cout<<"object destroyed!"
<
|
|
|
|
|
head dezee wrote:
we need to resolve it within 2 hours...
And what happens if it is not resolved within two hours?
head dezee wrote: now i'm not in the class
Why not? If you are not in the class, does that mean the problem ceases to exist, or has already been solved? Have others in the class been equally perplexed?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
the class will be continue within 2 hours... so i need to resolve this problem in 2 hours... this is my project.... i have make the coding but it have errors... i dont know why the errors exist....
|
|
|
|
|
What errors ? compilation errors ? run-time errors ? computation errors ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
compilation error....it said unidentified object...
|
|
|
|
|
In reference to what kind of object? You would stand a much better chance of receiving useful help if you'd volunteer just a wee bit of information rather than playing the 20-question game.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
hi,
can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ? i.e one increments a progress bar, the other responds to menu commands etc.
thx
|
|
|
|
|
saadani wrote: can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ?
Sort of. It's better to post those messages to the control's parent instead.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Not exactly. The thread that creates a window is the only thread that can pump messages for that window. So multiple threads can all send/post messages to a window, but only one thread can process them.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I have the following data in anexcel file.
A B C D
1.1 2.2 6.9 3.2
6 8.0 79 92.4
7.4 4.9 7.1
0.123 4 0.00457 64
64 0.04
3.2 88 7.2564 1.92
35.2 0.123 0.5768 95
1 2 3
5 6 7 8
9 10 12
Now my question is i need to sync the file.
i have read the first row, i.e 1.1,2.2,6.9,3.2 and stored it in a CArray.so, the size of my CArray would be 4.
It has all the elements in the row. It is ok.
Similarly i read the second row.Fine.
When i read the third row the second element is missing(Empty). If any one the elements is missing i need to ignore the row and get the next row.
How can i do this?
|
|
|
|
|
cuteee wrote: If any one the elements is missing i need to ignore the row and get the next row.
How can i do this?
Just count the number of delimeters. Each of your rows should have three. Any less, discard and move on.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|