|
HI Thankyou for your reply,I have recompiled again and again...my project is working in release mode.But when comes to debug mode it is giving linking errors(362) of the same type.....
And i have also tried to giv the library paths through #pragma comment(lib,"..."),,,but i am not exactly getting where should i include this pragma directive.....
can you further help?
modified on Tuesday, September 15, 2009 7:04 AM
|
|
|
|
|
OK - you sdee where you said 'I have set the linker settings.' in your first settings - you realise that Release and Debug modes have different settings?
Vetukuri Raju wrote: And i have also tried to giv the library paths through #pragma comment(lib,"...")
You can put it any where - I usually put the #pragma right after the #include that brings in that library's header file.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
No,,,i dinnt find any major differences.....out of 10 libraries it is anable to link three libraries...
My application is succesfully working on vs-2003....i have compared with 2003 debug setting also....
|
|
|
|
|
Ok,well i needed to write a program to display all alphabets,ie A to Z and i got a question(s) to ask.
The program i wrote is as follow :
#include<iostream>
using namespace std;
int main()
{
char letter='A';
while(letter<='Z')
{
cout<<letter;
letter++;
}
return 0;
}
1) The part where i bold-ed, why is there a need to put in the sign '...'?I tried running it without the '...' sign but the program won't run. It says its undeclared.
2)From (1),whats the difference if i put ".." instead of '...'?
3)If i were to declare something of type int,say "count=1".Why will the program run with count=1 and NOT run if i put count='1'.(see (4)where i put a '...' sign before and after the 0/26 after count)
4)If i were to modify my program into the following :
#include<iostream>
using namespace std;
int main()
{
char letter='A',count='0';
while(count<='26')
{
cout<<letter;
letter++;
count++;
}
return 0;
}
the whole program keeps running and i need to restart my laptop as the compiler somehow stuck. Why?
Thanks for answering.
|
|
|
|
|
UKM_Student wrote: he part where i bold-ed, why is there a need to put in the sign '...'?
Because that's (with one letter inside the quotes) the syntax for character constant s, see [^].
UKM_Student wrote: I tried running it without the '...' sign but the program won't run. It says its undeclared.
That's fine: without the quotes, A is no more a character constant , but instead an undeclared identifier .
UKM_Student wrote: 2)From (1),whats the difference if i put ".." instead of '...'?
Double quotes are used for string literals [^].
UKM_Student wrote: 3)If i were to declare something of type int,say "count=1".Why will the program run with count=1 and NOT run if i put count='1'.(see (4)where i put a '...' sign before and after the 0/26 after count)
The program will run in both cases, generating, of course, different outputs.
UKM_Student wrote: 4)If i were to modify my program into the following :
#include<iostream>
using namespace std;
int main()
{
char letter='A',count='0';
while(count<='26')
{
cout<<letter;
letter++;
count++;
}
return 0;
}<="" blockquote="">
Typing nearly random statements inside the IDE maybe amusing, I guess...
I strongly suggest you read a good C/C++ tutorial.
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]
|
|
|
|
|
What do u mean by IDE?
And regarding part 3, when i put count='1',the whole compiler runs it and gets stuck O_O,need to restart :X
|
|
|
|
|
UKM_Student wrote: What do u mean by IDE?
The same thing quite a lot of people mean too, I suppose [^].
(Should I say 'editor '?)
UKM_Student wrote: And regarding part 3, when i put count='1',the whole compiler runs it and gets stuck O_O,need to restart :X
The compiler runs and compiles the program. At the end you've an executable that, in turn, runs badly (make you restarting the computer). When a program hangs a system, it is, of course running, and producing (pretty noticeable) output.
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]
|
|
|
|
|
Ok,thanks for your help.
|
|
|
|
|
UKM_Student wrote: The program i wrote...
Really?
UKM_Student wrote: 1) The part where i bold-ed, why is there a need to put in the sign '...'?
What sign?
"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
|
|
|
|
|
What do u mean by really?
I remembered asking that question before and someone helped me out in editing my "wrong" program but i forgot to ask why he needed to put that '...' sign, but anyway, through trial and error i managed to produce the following :
#include<iostream>
#include<string>
using namespace std;
int main()
{
char letter='A',count=1;
while(count<=26)
{
cout<<letter;
letter++;
count++;
}
return 0;
}
|
|
|
|
|
UKM_Student wrote: What do u mean by really?
I remembered asking that question before and someone helped me out in editing my "wrong" program...
It came from here.
UKM_Student wrote: i forgot to ask why he needed to put that '...' sign,
What is a '...' sign? Elipses are often used with code snippets to show missing, irrelevant code. How do they pertain to this thread?
UKM_Student wrote: ...through trial and error i managed to produce the following :
#include<iostream>
#include<string>
using namespace std;
int main()
{
char letter='A',count=1;
while(count<=26)
{
cout<<letter;
letter++;
count++;
}
return 0;
}<="" blockquote="">
What trial and error? The code I gave you worked fine. Why the introduction of count ?
"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
|
|
|
|
|
Ah so u were the person that helped me out the other day :P
The sign i was talking about isn't the '...',but rather the ' ' sign,ie, why should we put char='A' and not char=A.But palin helped in answering this part earlier already xD
Re:Trial and error part, my tutor said the program was too short, and moreover someone else in my class also used the same program so i tried introducing the count char and after a few tries, i managed to get the answer. :P
|
|
|
|
|
UKM_Student wrote: The sign i was talking about isn't the '...',but rather the ' ' sign...
That's called a character constant.
UKM_Student wrote: Re:Trial and error part, my tutor said the program was too short...
Too short for what? Why add code just for the sake of adding it?
A different approach on it might have looked like:
for (char Letter1 = 'A'; Letter1 <= 'Z'; Letter1++)
cout << Letter1 << endl;
"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
|
|
|
|
|
Lol, 'coz if i were to have the same program with one of my classmates,the lecturer might think that we copied each other so.... yeah
|
|
|
|
|
True, technically, but the odds of that happening with a five line program are slim at best. Now if you turned in 100 lines of identical code, then you'd have issues.
"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
|
|
|
|
|
Hah ok, thanks for your help.
|
|
|
|
|
I'd like to implement a control that will be used to build up a list of recipients for an email. It will ideally behave in a similar manner to Outlook 2007 (as that's the product we sell as an email client).
The window class for the Outlook 2007 control is a RichEdit20WPT but that doesn't seem to match any of the rich edit class names in the SDK headers. Can anyone tell me if this is a standard control or not?
Do any of the standard rich edit controls provide the necessary features to get a control to behave like the Outlook 2007 controls?
|
|
|
|
|
Hi Steve,
I dont see anything about RichEdit20WPT in the MSDN about Rich Edit Controls[^]. If the naming convention is any clue then it is most likely an extended RichEdit20W control used exclusively in Microsoft Office.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi
Can anyone tell how to compare systemtime.
SYSTEMTIME t1;
SYSTEMTIME t2;
GetSystemTime(&t1);
GetSystemTime(&t2);
Is this a good approach
t1==t2
Thanks
|
|
|
|
|
VVVimal wrote: Is this a good approach
t1==t2
Depends on your needs (i.e. be specific!).
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]
|
|
|
|
|
|
Hi
CImage image;
image.Load (_T(read.tif"));
//x1 = 8108, y1 =68 , x2 = 8116,y2 = 82
CRect rect(x1,y1,x2,y2);
CDC *pDC=CDC::FromHandle(image.GetDC());
pDC->Draw3dRect(rect,RGB(255, 0, 0), RGB(0, 255, 0));
image.Save(_T("D:/2009ga.jpg"));
when i try to draw the rectangle in image ...
showing error msg like Expression : m_hDC == 0..but not drwing the rectangle in image..why
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
modified on Tuesday, September 15, 2009 4:49 AM
|
|
|
|
|
Why don't you have a look at the SimpleImage [^] sample code?
Alternatively: why don't you use a debugger?
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]
|
|
|
|
|
thanks ..i hope it ll help me ...
how to debugger in Visual studio ..already i am working in C# .net ....i think its same procedure ...?
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
The following code snippet (inside the OnPaint handler) works on my system:
CPaintDC dc(this);
CImage img;
img.Load(_T("foo.jpg"));
CDC * pdc = CDC::FromHandle( img.GetDC() );
CRect rc(0,0,100,100);
pdc->Draw3dRect(&rc, RGB(0,255,0), RGB(255,0,0));
dc.BitBlt(0,0, 400, 400, pdc, 0, 0, SRCCOPY);
img.ReleaseDC();
(Consider it as it si, just a silly example: for instance reloading the image at every OnPaint call is foolish).
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]
|
|
|
|
|