|
Cbadboy wrote: moveRange1.x: 0 (wrong for again no reason as the format pattern matches)
If you replaced the 0 in line to some other number, what value would moveRange1.x have?
Cbadboy wrote: So whats wrong really
How about coords.x having a value of 3412 instead of 3419?
What does sscanf() return?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
6 and problem is solved..
instead of %d i had to use %hd
for some reason int's in structs are different datatype yup just a lesson i learned
|
|
|
|
|
Cbadboy wrote: instead of %d i had to use %hd
Which means you had a short int .
Cbadboy wrote: for some reason int's in structs are different datatype
No such difference exists.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
I have problem to store a string type values in array.Simple i did it but my problem is how can i define a size of array,when i don't know how many data is came in array.I am stroing data in array at the run time.And don't want to fixed the size of array.Plz help me
|
|
|
|
|
Try the CArray class in the MFC and if you dont use MFC, check the vector class.
|
|
|
|
|
Nprog wrote: to store a string type values in array
Use CStringArray
|
|
|
|
|
You can also approach in STL way with std::string/std::wstring with containers like vectors, deque, list etc...
e.g vector<string> arrString; defines a string array in STL way. you can also approach other containers based on your use. Probably a vector will do.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
|
I was wandering if you guys know of any resources on web browser development
Plasma Steel Games | Web Administrator
FlashCoded.net | Web Administrator
|
|
|
|
|
Huh?
Neither Google nor CodeProject's search engines are working right now??
|
|
|
|
|
Plasma Steel Games wrote: I was wandering
Stop wandering and start searching in Google.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
Do you want to make it youeself or you want to use of open source codes? and whats your language c++?
|
|
|
|
|
I have a DAG (Direct Acyclic Graph) file and when directly open in C++, shows following:
processors 16;
comp 287 comma 129 commb 2430450;
taches 382;
10000,0 ;
10000,0:100;
10000,0:101;
....
....
....
Can any1 plz tell me how to open this file in C++ because after opening I need to work on the values it has. I know how to open a .txt file but how can I open this kind of file?
nOmI
|
|
|
|
|
Hi,
I'm maintaining an app that when I exit the application I get row after row of this:
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {33671} normal block at 0x02A2EA78, 21 bytes long.<br />
Data: <<N¤x > 3C 4E A4 78 04 00 00 00 04 00 00 00 01 00 00 00 <br />
d:\development\AppName\ProjectName\SomeFile.cpp(5716) : {33670} client block at 0x03897278, subtype c0, 2118 bytes long.<br />
a CNSFlexPropertyPage object at $03897278, 2118 bytes long<br />
Object dump complete.<br />
The program '[0xC90] AppName.exe: Native' has exited with code 0 (0x0).
Are these memory leaks? My fear is that they are memory leaks.
Thanks!
|
|
|
|
|
Like2Byte wrote: Are these memory leaks? My fear is that they are memory leaks.
Yes.
On the plus side, the dump tells you what line of code
did the allocation that wasn't freed...way easier than
trying to find it blindly.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you very much for your swift response.
In the interim, I located this magic gem:
Detected memory leaks!
Dumping objects ->
my list ensues. Subtracting the 6900 lines of front matter preceding the memory leak dump I'm left with 39011 lines of memory leak reports(or 19505 individual memory leak detections).
That being said, I think I'm going to be sick.
|
|
|
|
|
Like2Byte wrote: I'm left with 39011 lines of memory leak reports(or 19505 individual memory leak detections).
Ouch.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Thank you for pointing this out to me. I will give this try. I haven't read the entire link in detail but it looks very promising.
I've looked through a few of the memory leaks and some are as simple as
double* d = new double[nRecords*MAX_RECS];
...stuff
delete d; // where it should be delete[] d;
|
|
|
|
|
|
I am using the tan() function to rotate a coordinate
the spacing between each increment (arc)are not equal
Does anybody know why this is happening?
thank you
Simon
|
|
|
|
|
How are you using it (please post the code)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
here goes, all this for the first quadrant
///////////////////////////
x = 0;
y = 12;
degreeIncrement = 0;
for (---- about 30 times){
x = tan(degreeIncrement) * 12; ------>as 12 is the pyth theory (c square)
------> for the x position increment
y' = (12.0 * 12.0) - (x * x); -------> then square root y
y = sqrt(y);
plot line from origin to x,y + position on screen
m_degreeIncrement += 0.2; ------> or what ever value
} end loop
//////////////
Hope this helps, I am also aware of the cos, and sin functions formula
Thanks Simon
|
|
|
|
|
Having a hard time following the logic on your math. You're multiplying the tangent by 12, which appears to be the length of the hypotenuse since you using it later in what looks like the Pythagorean theorem. Since tangent has no relation to the hypotenuse, I'm not sure why you're doing that. (tangent = opposite / adjacent).
I'm not sure what you're trying to do, but if it's drawing "spokes" (like a wagon wheel) from the origin to various angles, then why wouldn't you just use something like:
x = length * cos(currentAngle)
y = length * sin(currentAngle)
And sweep thru the angles you want to cover?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|