|
Hi amit,
It will follow the below steps
1) x-= (--x) - x--; // Decrement x by one.
2) x-= ((--x) - x)--;// subtract x fom x.
3) (x-=--x - x)--;// Subract reult of above opertaion from X in the left side of =.
4) (x-=--x - x)--; // Now decrement the x by one.
so the results becomes 6.
|
|
|
|
|
HI nave ,
you are absolutely right dear the answer is 6.But
can you kindly explain with value . because suppose
Naveen.R wrote: 1) x-= (--x) - x--;
The value of x is 7.
here now the value is 7 for all x is it?
means ,
Naveen.R wrote: 2) x-= ((--x) - x) --;// subtract x fom x.
how can I follow the step 2
(7-7)--
will it zero or what ???
then will x will zero or the value 7 will still exist.
means,
7-=(7-7)--
//my question is here whether the value of x will zero here.then what is the value of x on LEFT SIDE. because right side I got zero right.
now
(7-=0)--
as go with logic....
now as x=x-0 means (7=7-0)--
then after it will decrement and the result 6.
I understand this way .but
I thought about the x value ???? is zero or 7 at step 2.
thanks nave
amit - bedcollege petlad
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
amitmistry_petlad wrote: here now the value is 7 for all x is it?
Yes.
amitmistry_petlad wrote: will it zero or what ???
yes it will be zero. But the value of X is still the same(7);
that line can be broken into the following to lines.
x-= 7 - 7;
x--;
|
|
|
|
|
Hi nave !
I need your help for API .
where can i find the API help and explanation??
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
amitmistry_petlad wrote: where can i find the API help and explanation??
What do u mean??????
havent u seen the MSDN[^] yet?
|
|
|
|
|
I was using vc6, and use get_selection to process the selected html elements.Now I want to add a to the left-top of the selected block,but I found that get_TopLine function is only available in .net 2003,how can I do with it?It's impossible to transfer my large project to .net 2003.
|
|
|
|
|
hi,
im compiling my code and got an error. can someone help?
#include stdio.h
#include sys/types.h
#include sys/sockets.h
#include netinet/in.h
#include netdb.h
void error(char *msg)
{
perror(msg);
exit(0);
}
int main(int argc, char *argv[])
{
int sockfd, portno, n;
struct sockaddr_in serv_addr;
struct hostent *server;
how to include sys/sockets.h using visual c++
it will compile in gcc.
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
C#Coudou wrote: #include sys/sockets.h
you should quote the file name in " like
#include "sys/sockets.h"
more over if the sys is not a subdirectory of your project project folder, you have to specify the path till the sys folder in the project settings.
Then take the Project Settings->C++ tab->In the category combobox select "Preprocessor". Now you can see a edit box with name "Additional include directories". Put the path of "sys" folder in that edit box( ie if the path of sysfolder is c:\temp\sys, put c:\Temp in the edit box )
|
|
|
|
|
C#Coudou wrote: #include stdio.h
#include sys/types.h
#include sys/sockets.h
#include netinet/in.h
#include netdb.h
Why have you failed to use <> here? You could also use "" but that just causes an extra folder to be searched.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually in my code there is <> , but in here when i click post message it doesn`t show. So i just remove <>.
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
Hi
For Dialog Application
I want to Add items to Context menu sub items at run time.
And Add event handler Also.
Sivaji
-- modified at 1:19 Wednesday 13th June, 2007
|
|
|
|
|
Sivajiram123 wrote: I want to Add items to Context menu sub items at run time.
Did you tried the CMenu::AppendMenu()?
Sivajiram123 wrote: And Add event handler Also.
When you click on the an item in the context menu, The Dialog Will get a WM_COMMAND message. So overide the OnCommand() function of the dialog. the low word of wParam ( LOWORD(wParam ) ) will be having the id of the menu.
|
|
|
|
|
|
call GetSubmenu() to get the menu under the breakpoint menu, It will return a CMenu pointer. Then call AppendMenu or InsertMenu using the pointer returned by the GetSubMenu().
|
|
|
|
|
|
|
|
|
What is the difference between the two?
1) Whenever you reserve a region of address space, the system ensures that the region begins on an allocation granularity boundary.
2)When you reserve a region of address space, the system ensures that the size of the region is a multiple of the system's page size.
allocation granularity of 64 KB and page size is 4 KB also memory allocated as reserved is always rounded to 4 KB. In that case how does the first statement manke a difference.
While calling malloc we allocate memory does that mean that we are reserving or commiting virual memory. I know malloc should do something with heaps and is nothing to do with API like VirtualAlloc. In that case does it call HeapAlloc.
|
|
|
|
|
|
Is there anything Raymond doesn't know? His blog in one of my favorites.
Steve
|
|
|
|
|
Is it possible that an Instruction Pointer value is NULL and is caught during debugging? What is the implication?
|
|
|
|
|
On What Context your instruction pointer beomes NULL?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Is is possible that while debugging memory dumps an IP becomes NULL
|
|
|
|
|
tom groezer wrote: Is it possible that an Instruction Pointer value is NULL and is caught during debugging? What is the implication?
Yes, it's possible. The following C++ code will result in this:
#include "StdAfx.h"
#include <iostream>
#include <windows.h>
void main()
{
typedef void (*PFun_t)();
PFun_t pFun = NULL;
__try
{
(*pFun)();
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
using namespace std;
cout << "Caught!!!" << endl;
}
}
Steve
|
|
|
|