|
There are other causes. In general it means the heap has been corrupted. There are many ways the heap can become corrupted. For example you may allocate some memory but write beyond the end or before the beginning and thus corrupt the CRT's book keeping data.
Steve
|
|
|
|
|
Stephen Hewitt wrote: example you may allocate some memory but write beyond the end
Exactly. That is what is happening in the sample that is given, strcpy puts a NULL char just after the last char which in fact is writing beyond the end.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hello everyone?
I wanna display data which is stored in database, as like 3D using OpenGL or Direct3D.
How can I solve this? You have any idea about this???
|
|
|
|
|
Can you be more specific
what data? picture /text?
whitesky
|
|
|
|
|
Could any one help me? I've been having probelms in an animation project and i do not really have an idea on how to render images n stuff. These are the requirements. A person should walk into a car, drive through a stree, leave the car and enter into one of the buildings. If there's anyone out there, please assist.
Regards.
Reuben K.
|
|
|
|
|
This project is VC or 3dMax or MAYA
if isnt VC then
maybe it is some helpful to you (i think a little difficult)
like this of course this isnt perfect anyway
1-you need to poser for personal and you can declare walk in poser
2- import this file to max or maya (of course you need to frames save for example 1 2 3 4,....20)
3- import to maya frame to frame and then assign one maretial to your object
4- you need to declare key frame (for example 3)
5- you need to one motion path
6- i think you need to IK for body (neck,chest,head,...)
whitesky
|
|
|
|
|
WhiteSky wrote: like this of course this isnt perfect anyway
1-you need to poser for personal and you can declare walk in poser
2- import this file to max or maya (of course you need to frames save for example 1 2 3 4,....20)
3- import to maya frame to frame and then assign one maretial to your object
4- you need to declare key frame (for example 3)
5- you need to one motion path
6- i think you need to IK for body (neck,chest,head,...)
Easier said than done!
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
yes but its possible
whitesky
|
|
|
|
|
|
not problem use 3dMax it supports poser and he can usign 3dMax i think its easy than MAYA
whitesky
|
|
|
|
|
I am using VC++ 6 with opengl but am a newbie. I'd really appreciate if you sent me some source code for study.
|
|
|
|
|
if you want learning Opengl I suggest use MSDN examples (CUBE) i think its good and
you can find examples in codeproject but if you want to create your example
i think create this project is easy in graphic programs instead visuall c
whitesky
|
|
|
|
|
How can I use a FlexGrid Control while using DLL's
Thank You
|
|
|
|
|
How to swape two strings without using temporary variable. can u help me in code this plz.
|
|
|
|
|
I am not going to write code for you.
you can use this simple logic and write your own code.
A := A + B; // aa+bb
B := A - B; // aa+bb-bb = aa
A := A - B; // aa+bb-aa = bb
Regards
Anil
-- modified at 2:10 Monday 29th May, 2006
|
|
|
|
|
this logic working for integers only, While Applying to strings its giving many errors.
|
|
|
|
|
Hello
This is a logic. how can it give you error
You must not do a + b for string unless its CString.
"aaaa" + "bbbb" what I mean is "aaaabbbb" not the mathmatic part of it.
Any way I think the logic is correct check your code.I can give you code using the logic , but you have got the code done from WhiteSky using different method.
Regards
Anil
-- modified at 2:52 Monday 29th May, 2006
|
|
|
|
|
Hai Anil i got the correct logic regardin this.Anyway Thank u for ur help.
|
|
|
|
|
Each string consists of characters. The characters are easily represented as integers. Need we say more?
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
i guess homework anyway
i test with these examples and it work
<code>
// str1="Is this true";
// str2="i dont know";
// str1="string 1 > string 2";
// str2="yes";
// str1="Inverse";
// str2="String2>String1";
// str1="1";
// str2="1 2 3";
CString str1,str2;
str1="3 2 1";
str2="1 2 3";
int Index1,Index2;
Index1=str1.GetLength();
Index2=str2.GetLength();
if(Index1<Index2)
for(int i=Index1;str1.GetLength()<Index2;i++)
str1.Insert(str1.GetLength(),' ');
else
for(int i=Index2;str2.GetLength()<Index1;i++)
str2.Insert(str2.GetLength(),' ');
for(int i=0;i<str1.GetLength();i++)
{
str2.Insert(str2.GetLength(),str1.Mid(0,1));
str1.Delete(0,1);
str1.Insert(str1.GetLength(),str2.Mid(0,1));
str2.Delete(0,1);
}
MessageBox(str1);
MessageBox(str2);
</code>
|
|
|
|
|
Thank u , iam going to homework on it.
|
|
|
|
|
This might the simple logic to swap two strings.
#include<iostream>
#include<string>
using namespace std;
void main()
{
char a[20]= " Krishna";
char b[20]= " Q3tech";
int lena,lenb,i;
lena=strlen(a);
lenb=strlen(b);
printf("%s,%s\n", a,b);
strcat(a,b);
strncpy(b,a,lena);
for(i=0;i
|
|
|
|
|
Little change
<code>
{
char a[20]= " Krishna";
char b[20]= " Q3tech";
int lena,lenb;
lena=strlen(a);
lenb=strlen(b);
printf("%s,%s\n", a,b);
strcat(a,b);
strncpy(b,a,lena);
strncpy(a, a + lena, lenb);
a[lenb] = '\0';
printf("%s,%s\n", a,b);
}
</code>
Regards
Anil
|
|
|
|
|
This is fore sure one of the strangest question i've seen.
I mean, when doing this with a string type, the class creates internal temp files for adding
and when using strcat you need to have already allocated enough memory to hold both the strings at once.
Anyway you alsoo need to add
b[lena] = '\0';
in order to make this work.
codito ergo sum
|
|
|
|
|
Yes I too very much agree with you.
No body do this in realworld programming.
This type of question I think are asked in interview to make people confuse.
That is why in my first post I just gave one of the methods not the code.
And thanks for the error
Regards
Anil
|
|
|
|