|
The only reason you would be seeing that message is if you are trying to step into the routines in the debugger. I would guess that you are doing this because the routines are crashing. They are crashing because you are calling them wrong.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
This is the way I'm using it:
int crttime=0;
char buff[30];
itoa(crttime,buff,10);
is it wrong???
10x,
Mirelutza
Mirelutza
|
|
|
|
|
itoa(crtime,buff,10);
should read
itoa(crtime,&buff,10);
Ant.
|
|
|
|
|
You can use the function _itoa()
here is the prototype:
char *_itoa( int value, char *string, int radix);
make sure you include these header files:
<br />
#include <stdlib.h><br />
#include <stdio.h><br />
Steve
|
|
|
|
|
Yes I've included the libraries and is still not working. Do I have to have a char* variable for example:
char* ch;
ch=itoa(value,string,10);
I think I tried like this too but it's still not working...
Am I doing something wrong???
Mirelutza
Mirelutza
|
|
|
|
|
I've done it! thanks to all...
|
|
|
|
|
I am trying to detect remotly whether a user is currently logged on to a specific machine. The platform is Win NT/2000/XP. Does someone is familier with an API to do this ?
|
|
|
|
|
Hey, can you please help me with this task...
I want to code a replacement list for variables. This list should be stored in a simple text file or in an simple TextArray (e.g.MAP).
e.g.
replacement.txt:
#txtTextVar - pDoc->m_TestVar1
I mean, that all places with #txtTextVar should be replaced with the content of pDoc->m_TestVar1.
How can I do this job?
|
|
|
|
|
Yes, a map is one solution. Implement it.
Kuphryn
|
|
|
|
|
Thanks you for your fast reaction,
but my problem is howto say my prog that "m_TestVar1" is m_TestVar1, you know what I mean? Let me make it clear,
when I have a string like "m_TestVar1" out of a textfile, how can I say my programm that it should replace #m_TestVar1 with the content of "m_TestVar1".
The problem is the assigment between "m_TestVar1" (as a given string) and m_TestVar1 as variable.
|
|
|
|
|
One solution is a map of, say, string key and "variable" value (whatever type you want).
Kuphryn
|
|
|
|
|
I think you misunderstand me.
Let me say it so:
i like to have a funktion with CString parameter.
<br />
int MyNewFunction (CString szVarName)<br />
{<br />
...<br />
return value;<br />
}<br />
szVarName should be the name of the variable. Now the function should return the value of the variable.
e.g.
<br />
m_iTest = 20;<br />
<br />
int iNewTest;<br />
iNewTest = MyNewFunction("m_iTest");<br />
<br />
<br />
Thanx for your help
|
|
|
|
|
Correct. In your example, one solution is a map of CString key and integer value.
Kuphryn
|
|
|
|
|
use some sort of struct that stores the name and the value and then store the struct in a map or array or linked list and then just go through the list with string comparisons and once you find the right one get the value
|
|
|
|
|
Can you give me a small sample please?!
|
|
|
|
|
this is just a sample as i said you can use any data storage thing you want like a linked list or map you could also use a class instead of a struct there this is just a small example of what i think your looking for
<code>
int m_Value1 = 0;
int m_Value2 = 1;
struct stuff
{
char*name;
int id;
};
stuff_array[2] =
{
{"m_Value1", m_Value1},
{"m_Value2", m_Value2},
};
int GetVal(CString name)
{
for(int i = 0; i < 2; i++)
{
if(name == stuff_array[i].name)
return stuff_array[i].id
}
}
</code>
|
|
|
|
|
I need a 16 bit compiler to compile the project that located at:
Microsoft Knowledge Base Article - 324409[^]
Because I tink BLDDRV.cpp (that Calls the 16-bit API which causes the INF driver index to be built ) need a 16 Bit compiler. Is it correct!?
I can NOT compile it by MSVC 6. I get many error by VC6 such as:
c:\98ddk\inc\win98\inc16\windows.h(181) : error C4226: nonstandard extension used : '_near' is an obsolete keyword
(Is older version of MSVC such as VC++ 1.52, 16 bit compiler?)
|
|
|
|
|
Behzad Ebrahimi wrote:
(Is older version of MSVC such as VC++ 1.52, 16 bit compiler?)
Yes. From time to time you can find a copy on EBay.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I found just book about VC++ 1.5, on ebay.com.
Can you help more me!
|
|
|
|
|
Behzad, send me your mailing address. I'll be happy to give you my copy of MSVC 1.52. I no longer use it and don't have it installed on my PC. Btw, it's also available on the MSDN discs (you need to be a subscriber).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
What the hell is it for?
I see them all the time in MFC code and have never had the need for it, so i've never bothered to read up on it...
Cheers
How do I print my voice mail?
|
|
|
|
|
A forward reference tells the compiler about a type (usually a class/struct) without giving the full definition. Its purpose is similar to a function prototype in that regard.
You most often use them when two classes have to refer to each other.
class Bar;
class Foo
{
Bar* m_pBar;
};
class Bar
{
Foo m_foo;
};
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
I kinda figured it was like a function prototype, but I wasn't sure...
Thanks for clearing that up for me
Cheers
How do I print my voice mail?
|
|
|
|
|
a class that has been declared but not been defined,the class is been called forward referenced.
|
|
|
|
|
I am trying to determin wether a point with certain koordinates is inside a circle determined by other 3 pointes.
I calculated the radius of the circel and the coordinates of its middle point
I now want to put the coordinates of the point I am examining into the circles equation to see wether its inside the circle or outside but becuse of inaccurate calculations (sqrt function etc.) I always get a very big error my calculations are correct as far as I can determine, how can I bypass this problem:
bool HszogTeszt (Pont a, Pont b, Pont c)
{
double hossz1qvd = Distanzqvd(a[0], a[1], b[0], b[1]);
double hossz2qvd = Distanzqvd(a[0], a[1] ,c[0], c[1]);
double hossz3qvd = Distanzqvd(c[0], c[1], b[0], b[1]);
double hossz1 = sqrt(hossz1qvd);
double hossz2 = sqrt(hossz2qvd);
double hossz3 = sqrt(hossz3qvd);
if (hossz1>= (hossz2+hossz3)) return false;
if (hossz2>= (hossz2qvd);
double hossz3 = sqrt(hossz3qvd);
if (hossz1>= (hossz2+hossz3)) return false;
if (hossz2>= (hossz1+hossz3)) return false;
if (hossz3>= (hossz2+hossz1)) return false;
double radiusqvd;
double s;
s = (hossz1 + hossz2 + hossz3)/2;
radiusqvd = (hossz1qvd*hossz2qvd*hossz3qvd)/(16*(s*(s-hossz1)*(s-hossz2)*(s-hossz3)));
double kx, ky;
ky = ((c[0]*c[0]-b[0]*b[0]+c[1]*c[1]-b[1]*b[1])*(c[0]-a[0])/2-(c[0]*c[0]-a[0]*a[0]+c[1]*c[1]-a[1]*a[1])*(c[0]-b[0])/2)/((c[1]-b[1])*(c[0]-a[0])-(c[1]-a[1])*(c[0]-b[0]));
kx = ((c[0]*c[0]-b[0]*b[0]+c[1]*c[1]-b[1]*b[1])/2-ky*(c[1]-b[1]))/(c[0]-b[0]);
int dpszamol;
{
double aux;
aux = ((FelszinPontok.PontHalmaz[dpszamol][0] - kx)*(FelszinPontok.PontHalmaz[dpszamol][0] - kx) +
(FelszinPontok.PontHalmaz[dpszamol][1] - ky)*(FelszinPontok.PontHalmaz[dpszamol][1] - ky) - radiusqvd);
if (aux<-1) return false;
}
return true;
}
Muad-Dib
mailto:adamo_piar@freemail.hu
Made in Hungary
|
|
|
|