|
Hey Der I'm a Newbie in C++ & I get this error while compiling My Application.
: fatal error C1083: Cannot open include file: 'studio.h': No such file or directory
Error executing cl.exe.
Pls Help!!!
|
|
|
|
|
the file is stdio.h not studio.h
next time, be careful on what you write
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
LOL Thanks My Bad.......
But now there 2 more errors..... LMAO They Jus dont stop do they.....
WhileDemo.cpp
E:\Hansveer\C++ For Dummies\Chap05\WhileDemo\WhileDemo.cpp(6) : error C2143: syntax error : missing ',' before '.'
E:\Hansveer\C++ For Dummies\Chap05\WhileDemo\WhileDemo.cpp(6) : error C2059: syntax error : '.'
Error executing cl.exe.
WhileDemo.exe - 2 error(s), 0 warning(s)
The program is as follows, Its jus a tutorial.
// WhileDemo - input a loop count. Loop while
// outputing astring arg number of times.
#include <stdio.h>
#include <iostream.h>
int main(int arg. char* pszArgs[])
{
// input the loop count
int loopcount;
cout << "Enter loopcount: ";
cin >> loopcount;
// now loop that many times
while (loopcount > 0)
{
loopcount = loopcount - 1;
cout << "Only" << loopcount << "loops to go\n";
}
return 0;
}
|
|
|
|
|
Psych0hans wrote:
int main(int arg<b<font color="red">. char* pszArgs[])
it must be a ', ' between the parameters, not a '. '
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Psych0hans wrote:
int main(int arg. char* pszArgs[])
Please be carrefull when you copy the examples ! In general the error messages are there to help you. If they say there is an error at line 6, in general it's because there is an error on line 6. And if they say something like
error C2059: syntax error : '.'<br />
Error executing cl.exe.<br /> maybe it's because there is a '.' somewhere where it shouldn't.
So replace the line by:
int main(int arg, char* pszArgs[])
and this should work
|
|
|
|
|
Hey Guys Thanks Again for Your Help....... Yes U were right.... LOL But these Drated errors Jus go on & on...
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/WhileDemo.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
What Will I ever do......... I really appreciate Ur help though!!!
I'm Jus a Bit
|
|
|
|
|
That is because you created your project as a Win32 application so the linker looks for the WinMain function to start the code... and of course it cannot find it because you use the main entry point instead. So, go in the project settings and the must be somewhere there an option to change the project type. Select it as a console application.
Or restart a new project and at the begining, be carrefull to choose console application. Then add your file to the new project.
Hope this helps
|
|
|
|
|
Thanks Yall For Ur Help Guys I've finally seen the error in My Ways..... :-P But seriously Thanks for the Help I finally Figured out my mistake & I O U 1
|
|
|
|
|
|
Start You project As CONSOLE Application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Nope, not this time
|
|
|
|
|
Yes You WON
|
|
|
|
|
Hey, what's happened to your blue name ?? You're not recognizable like that !
|
|
|
|
|
Actaully I am using Shog9 CPhog Script and i forget to fill required field there! .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
One thing software development teaches you - read things properly and as a consequence patience.
This might sound trivial but is a very important skill, you've just seen why.
Elaine
The tigress is here
|
|
|
|
|
This is the second time I post the question - the first time nobody answered. Obviously the list control is used in Large Icons mode very rarely.
Do somebody know how to retrieve the bounds of a List Control item in Large Icons mode (using the style LVS_ICON)?
The control offers the method GetItemRect(), which has the options:
- LVIR_BOUNDS
- LVIR_ICON
- LVIR_LABEL
- LVIR_SELECTBOUNDS
I expected, that the option LVIR_BOUNDS should return the whole item rect, but it doesn't. It returns the smallest rectangle, bounding the icon and the current label text. The same results I get by LVIR_SELECTBOUNDS.
There is another method - GetSubItemRect() - but it works only for list controls in LVS_REPORT mode.
|
|
|
|
|
We used SQLServer the time before, now we use access,but the code goes wrong.what's the matter?
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > m_time ";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
qqworm
|
|
|
|
|
i see 2 things :
maybe you should provide a '; ' at the end of your query.
you should also ensure that it is the right date format with your new database (and perhaps localization dependant)...
for example, i currently work with two Oracle DB Servers, one US english installed, the other one in French => The date formats are really not the same on each databases !!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
(the format of data in the database is date format)
but it says that the format doesn't macth.
qqworm
|
|
|
|
|
qqworm wrote:
(the format of data in the database is date format)
but it says that the format doesn't macth.
you don't seem to understand.
a same database can have multiple formats for a same date object depending on its locale settings (language, etc...)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I'm not sure did I get it correctly, but probably this should work:
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > '"+m_time+"'";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
I'm worndering didn't you get SQL exception when you execute your original statement: "select * from job_info where job_recordtime > m_time " ?
|
|
|
|
|
I modify the code,but it dosen't work yet.
(the format of data in the database is date)
_variant_t strQuery;
CString m_time="2005-5-1 12:00:00";
strQuery="select * from job_info where job_recordtime > '"+m_time+"' ";
theApp.ADOExecute(theApp.m_pADOSet,strQuery);
qqworm
|
|
|
|
|
Surround the date/time constant by # instead of single quote:
strQuery="select * from job_info where job_recordtime > #"+m_time+"# ";
The query language of MS Access alway surprises me with its original ideas!
|
|
|
|
|
Oh,Great!it really works. thanks!thanks!thanks!
qqworm
|
|
|
|
|
I seem to recall date literals needing to be surrounded by # like:
strQuery="select * from job_info where job_recordtime > #2005-5-1 12:00:00#";
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|