|
|
We may ask Chris to make a new forum, the 'I need help URGENT plz' one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
dr.nokia wrote: ((((#include "Name.h")))))
Michael Schubert wrote: Brace yourself.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Well, you should go back a read your class notes; ask you classmates, friends, teacher, teaching assistants ...
This is very, very, very basic stuff you are asking.
This signature was proudly tested on animals.
|
|
|
|
|
Dude I know it basic and easy Q. but it confusing me
|
|
|
|
|
dr.nokia wrote: I have Assignment in c++...
First one?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
So what do have you in place so far? What compiler/linker error(s) are you getting?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
[Linker error] undefined reference to `Date::getDate()'
[Linker error] undefined reference to `Date::showDate()'
ld returned 1 exit status
I must link the .ccp , .h with the mainCode but it's not working
how ever if I put the code in one main file it works fine
|
|
|
|
|
Is Date a class of yours? Are getDate() and showDate() static methods?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
ya
the program ask the user to implemnt the date mm/dd/yy with function int getDate()
and the program should outputs the with void showDate()
but this two function are public members and the ipmlemntation in .cpp file
#include "stdafx.h"
#include "Date.h"
#include <iostream>
using namespace std;
int main()
{
Date d;
cout<<"Enter the date within formam mm/dd/yy\n";
cin>>d.month>>d.day>>d.year
d.getDate();
d.showDate();
system("pause");
return 0;
}
//Date.cpp function
#include "stdafx.h"
#include "Date.h"
using namespace std;
int Date::getDate() //(int month,int day,int year)
{
return(month,day,year);
}
void Date::showDate()
{
cout<<month<<"/"<<day<<"/"<<year<<endl;
}
//HEADER FILE
#ifndef DATE_H
#define DATE_H
class Date
{
public:
int month;
int day;
int year;
int getDate();
void showDate();
};
I think my problem in the passing arguments !!?
|
|
|
|
|
dr.nokia wrote: return(month,day,year);
What is this?
dr.nokia wrote: cin>>d.month>>d.day>>d.year
Missing a semicolon.
dr.nokia wrote: d.showDate();
This statement is not doing anything useful.
dr.nokia wrote: I think my problem in the passing arguments !!?
No. Arguments are what get passed to functions/methods.
Other than the one syntax error, your code should compile and work as expected. It could be vastly improved, but that is another subject altogether.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanx Mr.Daived
i fixid the semicolon but it not working also
i will try my best and thanx alot for ur help
good luck !!
|
|
|
|
|
What about a good C++ tutorial?
BTW you really need to read this [^], before posting.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I found the opencv source of cvcamshift.cpp .I have one problem of cvCamShift function in this file.That is how it change the weidth and hength and orientation .
In cvcamshift.cp:
m00 = moments.m00;
m10 = moments.m10;
m01 = moments.m01;
mu11 = moments.mu11;
mu20 = moments.mu20;
mu02 = moments.mu02;
if( fabs(m00) < DBL_EPSILON )
EXIT;
inv_m00 = 1. / m00;
xc = cvRound( m10 * inv_m00 + windowIn.x );
yc = cvRound( m01 * inv_m00 + windowIn.y );
a = mu20 * inv_m00;
b = mu11 * inv_m00;
c = mu02 * inv_m00;
/* Calculating width & height */
square = sqrt( 4 * b * b + (a - c) * (a - c) );
/* Calculating orientation */
theta = atan2( 2 * b, a - c + square );
/* Calculating width & length of figure */
cs = cos( theta );
sn = sin( theta );
rotate_a = cs * cs * mu20 + 2 * cs * sn * mu11 + sn * sn * mu02;
rotate_c = sn * sn * mu20 - 2 * cs * sn * mu11 + cs * cs * mu02;
length = sqrt( rotate_a * inv_m00 ) * 4;
width = sqrt( rotate_c * inv_m00 ) * 4;
IN a paper:(I am sorry ,It's not clear .But if you want I can send to you.)
The orientation (θ) of the major axis and the scale of the distribution are determined by finding an equivalent rectangle that has the same moments as those measured from the 2D probability distribution image (c.f. Horn, 1986). Defining the first and second moments for x and y
ΣΣ=xyyxIxM),(220
ΣΣ=xyyxIyM),(202
ΣΣ=xyyxxyIM),(11
The first two eigenvalues (the length and width of the probability distribution) are calculated in closed form as follows. From the intermediate variables a, b and c20020cxMMa−= −=ccyxMMb00112 20002cyMMc−=
We find the orientation of the equivalent rectangle −=−cab1tan21θ
The distances l1 and l2 from the distribution centroid (the dimensions of the equivalent rectangle) are given by, 2)()(221cabcal−+++= 2)()(222cabcal−+−+=
Where the extracted parameters are independent of the overall image intensity.
Thank you .I am looking forward to your answer.
|
|
|
|
|
As far as I can understand, there is no question, in your post.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
sorry,I don't understand.Do you say you can't understand me?
hello
|
|
|
|
|
Simply there is no question in your post: what did you intend to ask? Moreover could you please reformat it? As it stands, it is difficult to understand.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|
Hy folks,
I have a little question of reading out the amount of memory that one can use for a program.
I know there exists the method filling up the memory until you get an exception, but this isn't a nice way, right?
So my question: Is there a way to read out memory specs in windows and other platforms as well?
I was just wondering if one of you can thing of a nice platform independent function or approach to calculate the amount of memory available in the system.
Also I am interested to find out the amount of processors to calculate the amount of threads for that platform.
I am sorry for the leaking of knowledge.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
modified on Tuesday, March 24, 2009 11:41 AM
|
|
|
|
|
Check out GlobalMemoryStatusEx() and the structure MEMORYSTATUSEX on MSDN.
|
|
|
|
|
Thanks.
But this is just for windows, right? Or do you thing I have to check the op system before doing something. If that is possible.
I am also interested in reading out the sys specs in general. For example the amount of processors to calculate how many threads I could start..
But thanks for pointing me in a direction.
Cheers.
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
|
Thanks you very much.
But still either I am blind or just not seeing it, I can not find a nice function or a set of functions that return me system information.
Actually, if I am allow to keep you busy, I am lacking of knowledge to detecting on which op I am on.
I mean if I can detect what Os I am facing, it is straight forward to use your suggestion for windows and in Linux, I think, the specs are written in a file.
Macs fights for their owns.
But thanks for the great answers.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|