|
what is it a[0]...//used without being defined
int a[3];
a[0]=a[1]=a[2]=0;
a[2] +=7;
and then output is 5 and 10
|
|
|
|
|
Hi,
If I write same Program as,
#include <stdio.h>
void main()
{
int i = 5;
printf("\t %d \n\t",i);
int a[2];
a[3] +=7;
i = 10;
printf(" %d \n\t",i);
}
Than Output is,
5
10
Why? So what is problem in that Program?
Thanks,
Aniket.
|
|
|
|
|
You are breaking the rules. Do not do this.
You say you understand arrays and indexes...then why do you insist on using a[3]?
a[3] is pointing to an area of memory that is being used by another part of the program. It might point to the actual memory being used by int i, it might be pointing to something else. It all depends on how the compiler allocates memory on the stack and in what order you have declared your variables and it's going to change everytime you edit your program.
You are not supposed to be using a[3] so don't use it!
if you create your array:
int a[2];
then you can go use a[0] and a[1], and that's it. Period, exclamation point.
|
|
|
|
|
int a[2];
a[3] +=7; //a[3] is return address(i = 10)
//a[3]+=7 return address is (printf(" %d \n\t",i));
i = 10 do not working
sorry
hello
|
|
|
|
|
Hi,
I'm looking for resource on calling xsl(or xslt) from c++, i'd been looking this for a week almost & haven't come across a good usefull one.
So could some one please let me know, even a code snippet will do.
Thanks.
Mohan
|
|
|
|
|
|
Hi all,
I am tring to get the incoming PIDs & their details using FilterGraph.But I have some problems regarding IMpeg2Data & IMpeg2PsiParser.
1)I added following statements in my code =>
IMpeg2Data *pMPEG = NULL;
hr = pMPEG2Demux->QueryInterface(IID_IMpeg2Data,(void**)&pMPEG);
it is giving me Error as follows =>
Linking...
aDlg.obj : error LNK2001: unresolved external symbol _IID_IMpeg2Data
Debug/a.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...
What should i do? Is there any library missing. I have added libraries "Strmiids.lib Quartz.lib Dmoguids.lib" & also i have included 'mpeg2data' header file.
2)When i tried to add following statement =>
IMpeg2PsiParser* pMpeg2Psi;
it is giving Error as =>
error C2065: 'IMpeg2PsiParser' : undeclared identifier
Please Help me. Thanks in advance.
Aniket
|
|
|
|
|
Aniket Salunkhe wrote: i have included 'mpeg2data' header file.
I guess there must a corresponding library file also for this header file. Please check.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
You are using the source from the PSIParser DirectShow sample filter right?
#include "IMpeg2PsiParser.h"
and remember to
#include <initguid.h> before
#include "IMpeg2PsiParser.h" in one of your cpp files.
|
|
|
|
|
Thanks for your advice.
Now it is not giving error.
I have connected DEMUX --> PSI Parser. So can i get the all incoming PIDs & their details OR details of selected PIDs using 'IMpeg2PsiParser' interface here.
Thanks in advance.
Aniket.
|
|
|
|
|
Users get the message:
"This application has failed to start because the application configuration is incorrect. Reinstalling your application may fix the problem."
Does anyone know how to solve this problem?
I'd like to make sure my application runs on 98SE, WinXP Pro etc... any help? Thanks very much in advance!
using visual studio 2005...
(MFC app, NO .NET)
(using the NSIS installer)
build log follows:
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001D49765820.rsp" with contents
[
/O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_BUILDING_ON_WIN2K" /D "_AFXDLL" /GF /FD /EHsc /MD /Gy /Yu"stdafx.h" /Fp".\ReleaseW2k/File1.pch" /Fo".\ReleaseW2k/" /Fd".\ReleaseW2k/" /W4 /c /TP ".\File4.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001D49765820.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001E49765820.rsp" with contents
[
/O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_BUILDING_ON_WIN2K" /D "_AFXDLL" /GF /FD /EHsc /MD /Gy /Yu"stdafx.h" /Fp".\ReleaseW2k/File1.pch" /Fo".\ReleaseW2k/" /Fd".\ReleaseW2k/" /W4 /c /TP ".\File1.cpp"
".\File2.cpp"
".\File6.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001E49765820.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001F49765820.rsp" with contents
[
/OUT:".\ReleaseW2k/MyAppName.exe" /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:".\ReleaseW2k\MyAppName.exe.intermediate.manifest" /PDB:".\ReleaseW2k/File1.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 shell32.lib kernel32.lib user32.lib
".\ReleaseW2k\File3.obj"
".\ReleaseW2k\File4.obj"
".\ReleaseW2k\File5.obj"
".\ReleaseW2k\File6.obj"
".\ReleaseW2k\File2.obj"
".\ReleaseW2k\File7.obj"
".\ReleaseW2k\StdAfx.obj"
".\ReleaseW2k\File1.obj"
".\ReleaseW2k\File1.res"
]
Creating command line "link.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001F49765820.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00002049765820.rsp" with contents
[
/outputresource:".\ReleaseW2k\MyAppName.exe;#1" /manifest
".\ReleaseW2k\MyAppName.exe.intermediate.manifest"
]
Creating command line "mt.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00002049765820.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\BAT00002149765820.bat" with contents
[
@echo Manifest resource last updated at %TIME% on %DATE% > ".\ReleaseW2k\mt.dep"
]
Creating command line """c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\BAT00002149765820.bat"""
-- modified at 1:16 Saturday 6th May, 2006
|
|
|
|
|
Be more specific please.
What kind of application (project type, the functionality, etc.)?
Under what OS?
......
......
Maxwell Chen
|
|
|
|
|
My apologies...
Its a MFC (no .NET project)... target install base are WinXP computers, but I'd like it to run on 98SE and up. I tried to link everything statically.
The user who tried installing it had WinXP Pro SE installed.
Could the error be that I didn't specify which version of Windows I wanted it to work on in the header files? I.e. I didn't have:
#define WINVER 0x0410
or
#define _WIN32_Windows 0x0410
Would this have fixed it?
|
|
|
|
|
|
maybe you use from resources that are only in your windows
|
|
|
|
|
I want to connect mobile communication with my program
how to do this;
|
|
|
|
|
narkhi wrote: I want to connect mobile communication with my program
Do you mean that you are planning to implement WiFi client in your code?
Maxwell Chen
|
|
|
|
|
|
void CMyListCtrl::OnNcLButtonDown(UINT nHitTest, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(HTVSCROLL == nHitTest)
MessageBox("LButtonDown On Vertical Scroll");//Here is OK
CListCtrl::OnNcLButtonDown(nHitTest, point);
}
void CMyListCtrl::OnNcLButtonUp(UINT nHitTest, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(HTVSCROLL == nHitTest)
MessageBox("LButtonUp On Vertical Scroll");//No MessageBox. what should I do??
CListCtrl::OnNcLButtonUp(nHitTest, point);
}
|
|
|
|
|
Do you see MSDN this event
when you press left mouse button or release left mouse button in noneclient area
if you click in scrollbar in your application you can see action from this event
And you need to OnNcLButtonUp or WM_LBUTTONUP
|
|
|
|
|
I have done what you said,result is failure
|
|
|
|
|
no its very simple you can click in scrollbar from your application and you get your messagebox
|
|
|
|
|
I am using C++ on Visual Studio 6, and now I want to work on .NET environment, so I am asking if there are differences between C++ on VS6 and VS.NET
Thanks a lot
|
|
|
|
|
Traitor
Steve
|
|
|
|
|
I would be a tailor if I have migrated to C#
|
|
|
|