|
how to make a standard code. pls help me.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
What do you mean by STANDARD CODE?
If I get you correctly you are looking for some coding standards. You should look out for some manual that contains the coding standards, read through it and later abide by them.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes i need some manual to make my code a standard one. what are all the conditions for a standard code
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Look out for High-Integrity C++ Coding standard manual somewhere here. I hope this helps you out.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
hi,
how can i open a dao database (.mdb) in an VC++ application.And sfter that how can i copy a record to another location whenever i click that record.
Thanks
|
|
|
|
|
trang1800 wrote: how can i open a dao database (.mdb) in an VC++ application
Well, Microsoft recommends you don't (DAO will not be supported in the future, and there's
better technologies available).
DAO is not a database. It provides a way to access databases.
Here's a great place to learn: Data Access Programming[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi.
I am having this error and I don't know what to do with it.. Please help.
error C2440: 'initializing' : cannot convert from 'class CDocument *' to 'class CVector_3DDoc *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
When I double clicked on the error, it points to this code: CCVector_3DDoc* pDoc = GetDocument();
What is wrong with this code? class CVector_3DDoc is a class that I have added with the base class as CDocument. Thanks.
|
|
|
|
|
ReturnRain wrote: What is wrong with this code?
The compiler is telling you exactly what is wrong.
CCVector_3DDoc* pDoc = (CCVector_3DDoc *) GetDocument();
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi.
Thank for replying. But now I have another error:
error C2440: 'type cast' : cannot convert from 'class CDocument *' to 'class CVector_3DDoc'
No constructor could take the source type, or constructor overload resolution was ambiguous
What does it mean?
|
|
|
|
|
ReturnRain wrote: ...to 'class CVector_3DDoc'
The cast operation is wrong. You should be casting one pointer to another.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Try this ya
CCVector_3DDoc* pDoc =reinterpret_cast<CCVector_3DDoc*>(GetDocument());
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
|
Please tell me CCVector_3DDoc is derived from CDocument before you go and use reinterpret_cast
everywhere to fix everything
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi,
I'm trying to redirect output of a command to a file
this command works fine in dos command line: ipconfig.exe /all > c:\\ipconfig.txt
In my program I do this way:
_execlp("ipconfig.exe","ipconfig.exe","/all",NULL); --> works fine
_execlp("ipconfig.exe","ipconfig.exe","/all",">","C:\\ipconfig.txt",NULL); ---> crash without a trace !!!
I don't know what is the problem here ?
|
|
|
|
|
Put ipconfig.exe /all > c:\ipconfig.txt in a batch file. and then run the batch file via CreateProcess() or ShellExecute() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all:
I want to measure strings from different languages and different fonts in a Win32 app, Is there any APIs that I can take advantage of, or do it from scratch?
Thanks.
|
|
|
|
|
Check out GetTextExtentPoint32()
|
|
|
|
|
Hi
<br />
char buf[10] = "old";<br />
char *c = "new";<br />
c = buf;
buf = c;
I can assign array name to pointer but i can not assign to array.
Why? Isn't array a pointer?
thanks
|
|
|
|
|
That is because buf is a pointer to a static array of length 10. If you want to initialize it, then use strcpy function.
Sisira
|
|
|
|
|
An array is not a pointer. However, in some cases, there is an automatic conversion from an array to a pointer to the first element of the array. In other words, this:
c = buf; actually does:
c = &buf[0];
|
|
|
|
|
It seems using the following scheme would cause problem while building in MS Visual Studio 2005. Can someone give any suggestion on HOW TO ACCESS MEMBER VARIABLE OF b IN a.cpp? Some preprocessor instructions would be appreciated. Thanks a lot.
class b;<br />
class a : public A<br />
{<br />
public:<br />
void SomeFunction();<br />
b* m_pb;<br />
};<br />
<br />
#include "a.h"<br />
#include "b.h"<br />
void a::SomeFunction()<br />
{<br />
MEMBERVARIABLEDATATYPE Member_Variable_of_b = m_pb->MemberVariable;
}<br />
<br />
class a;<br />
class b : public B<br />
{<br />
public:<br />
a* m_pa;<br />
MEMBERVARIABLEDATATYPE MemberVariable;<br />
};
|
|
|
|
|
This works fine so I'm not sure what you are doing to get an error.
Output is..."Member variable of b = 22"
// b.h ********************
#include "stdafx.h"
class a;
class b
{
public:
int m_a;
b();
virtual ~b();
};
// b.cpp ********************
b::b() : m_a(22)
{
}
b::~b()
{
}
// a.h ********************
#include "stdafx.h"
class b;
class a
{
public:
void SomeFunction();
b* m_pb;
a();
virtual ~a();
};
// a.cpp ********************
a::a() : m_pb(NULL)
{
m_pb=new b();
SomeFunction();
}
a::~a()
{
if (m_pb) {
delete m_pb;
}
}
void a::SomeFunction()
{
if (m_pb) {
int Member_Variable_of_b=m_pb->m_a;
TRACE("Member variable of b = %d\n",Member_Variable_of_b);
}
}
|
|
|
|
|
I am developing a multi-people chat game.I want to use RTC achitecture I don't known RTC very well.Some people would give me a guid to reach it?
Thanks.
|
|
|
|
|