|
Ouch, sorry, I forgot that you wanted to do with recursion (is it a homework BTW ?)
Yup, I think this will work (didn't check it in detail but it looks correct).
|
|
|
|
|
any way .. thanx thanx thanx for your helping ..
you are a good teacher and intellegent one ..
I hope that this code will be usefull for every body in this website ..
See You
|
|
|
|
|
I got
remoteAccess error LNK2019: unresolved external symbol __imp__AlphaBlend@44 referenced in function _WinMain@16
when I use AlphaBlend api, I included windows.h in my source code and I can use other windows api without any problem ( I can use BitBlt too which I assume it located in the same dll as AlphaBlend, gdi32.dll)
|
|
|
|
|
|
resolved, thanks, FAQ is useful
|
|
|
|
|
plz tell me something about how to get L2 CACHE SIZE AND SPEED of any system in Visual C++ ....
Plz send me exact code for that
Thanking You.
Sincerely,
VIRAL PATEL
|
|
|
|
|
Before I answer, answer me this: why would you need such information? What are you doing?
-- modified at 11:48 Thursday 9th March, 2006
|
|
|
|
|
Please help me somebody..im not good in programming..
i really need someone help to guide me please i need to design an abstract data structure to represent matrices then i have to overload the *, + and - operator so that they perform the correct operation accordingly for matrices. My friends said that i have to use the two dimensional arrays but then i still can figure out i have to implement a two dimensional dynamic array to represent the matrix. This is the following code that shows me on how to define a two dimensional
dynamic array of any size (in the example below the size is 2 by 2):
int **matrix;
int rows = 2;
int cols = 2;
matrix = new int *[rows];
for(int i=0; i
|
|
|
|
|
Check out matrix TCL Lite[^].
It is a relatively simple matrix implementation. There are more complicated better performing libraries out there, but they aren't easy to learn from.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
Paranoiana wrote: But then i still cant get it how to do it..im really bad in programming..but i really want to learn it..please help anybody thank u
Try this: The Matrix and Quaternion FAQ[^]
Although you can start with a library, you might be better off starting here, learning how and why they both work, and what they can-be/are used for. Plus it is excellent reading on the quaternions too (I use quaternions as often as possible myself). Once you understand how and why they work, and what purposes to use them for, then you can pick your favorite matrix library/class and go from there.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
USING Visual C++ .Net
I want to design a class to represent a day’s bookings in an appointment book.
This class should hold the day’s date and an array to represent each hour of
the day for which an appointment can be made (say nine entries, representing 9.00 to 17.00 ).
Each element of the array only needs to be able to indicate whether that hour is booked or not.
the above class should include the following methods:
- prompt for and accept the day’s date
- initialise all the hours in the day to “free”
- repeatedly prompt the user for an hour number
- if the hour is “free” mark it as “booked”
- otherwise tell the user “already booked”
- display the day and its appointments
e.g.
20/12/05
9 booked
10
11 booked
12 booked
13 booked
14
15
16 booked
17
thanks in advance.
|
|
|
|
|
Ok, I understood what do you want to do, but where have you been stucked? What is the question / the problem you have?
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
He wants you to write the class for him for his school homework.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
|
it least give him an idea or two to start with
|
|
|
|
|
1) prompt for and accept the day’s date
cout<<"Enter date";
cin>>date; (but before this u need to create a variable for date - i guess u already know that)
2) - initialise all the hours in the day to “free”
u can use a for loop for this.
and yes for 'hour' integer variable u need to create an int array.
3)- repeatedly prompt the user for an hour number
i don't understand.....repeatedly means what intervals it should follow?
4) - if the hour is “free” mark it as “booked”
use the if else construct for this
5)- otherwise tell the user “already booked”
same if then used as in 4)
6)- display the day and its appointments
in a for loop u need to use cout.
I hope that helps u?
Regards
|
|
|
|
|
Friends ! I need help !
I have to write a programme in C++ which can listen or sniff the serial port, but without opening the port. The sniffer and the programme which communicates through the serial port has to be on the same PC, I have to write a program which can read ( or listen ) the data that goes out and comes in from the serial port, BUT NOT TO OPEN THE PORT, to let communication programmes communicate through serial ports.
If anyone has an idea how to write this sniffer programme, please send me a advise.
Many thanks !
Szilard
SZ
-- modified at 6:08 Thursday 2nd March, 2006
|
|
|
|
|
Don't cross-post. Your question is C++ related so it has to stay on the Visual C++ forum, it doesn't belong to this forum (which is for managed).
|
|
|
|
|
Why do they have to be on the same PC?
If they really don't then make a cable that taps wires TX, RD and Ground (on a 25 pin I think that's 2 3 and 7). Hook the taped lines to the com port on the other machine and you can monitor the traffic.
|
|
|
|
|
there is a program that allows you to do just that, and it's free. That program is called: "PortMon" and it comes in a suite of moitoring software such as FileMon, RegMon etc.
----
www.muzikstor.com
|
|
|
|
|
Hi to everyone....I have an opengl application contains a 3-D shape where the user can rotate it,translate it e.g.... Well my problem is that i want to click on lines and points of this grafic and show details for that point or item....I think is called hit test!!!!!Does anyone knows how can i do that or show me a link in web telling me how to do that, or just give me some simple steps!!!!!
Thanks u for ur time!!!!
giotis
|
|
|
|
|
Uh. Well. I don't know how to realize with OpenGL, but if you want to know something about OpenGL http://nehe.gamedev.net/[^] is a much better place to look at. There should be a forum, too.
I only now how you could realize it programming it all on your own in C++. Then you have to project the 3D-Scene on a 2D-Matrix and you store which points (perhaps as a vector linetest) are corresponding to which object.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Thanks for ur response!!!!That was my first decide to convert the 3-D to
2-D Matrix, but i think is so difficult because the objects rotates and that mean that the coordinates must change!!! I find a way to make it with glLoadName[] argument.....where every line and spot will be an index in that matrix.......Do u know anything about that????
Thanks!!!!!!!!!
Giotis
giotis
|
|
|
|
|
No sorry. Yet I just did the rotation for myself and worked with the scene parallel to OpenGL (I wrote a "Level of Detail" appoximative collision detection for huge scene with a large amout of objects), so I just know the OpenGL basics and did the other work on my own.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
There are several ways to do this. The "hit test" implies solid shapes, or triangles. This is because points and lines are one dimensional objects. A triangle has a 2D surface projected in a 3D environment, but when the surface is shown to the user, it occupies enough space on the screen to be selected and chosen. Although you can draw a triangle as a wire-frame, you will want to store the data as triangles rather than points or lines.
It seems there is even a Code Project article on it: http://www.codeproject.com/opengl/openglmousesellection.asp[^]
You can also save yourself the math in your 2D to 3D projection idea by using the glProject() and glUnProject() routines. By comparing the results with your mouse location you can do "nearest" operations which are a little more complicated since they imply distance operations.
You can shortcut some series, by using a culling sphere concept (center of object), and finding the overlapping cull spheres, by checking distance to center and radius of sphere to distance. When the chosen point is within the cull sphere, then and only then will you parse through the full object to find which point. You can also do similar operations with faces with center and range operations, though that will more likely take longer then applying other methods.
If you do a google search on "opengl picking" or "opengl mouse picking" you will find lots on the subject from various sources.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-- modified at 16:13 Thursday 2nd March, 2006
|
|
|
|
|
Jeffry J. Brickley wrote: The "hit test" implies solid shapes, or triangles. This is because points and lines are one dimensional objects.
No it doesn't. You can develop a hit test for lines too. Just make a line a little bit thicker when projecting it to your textmatrix (just anti-aliasing but with non different values). This works properly good.
Greetings,
Ingo
------------------------------
PROST Roleplaying Game
|
|
|
|