|
hi,
I'm a developper and i'm lookin for books oriented to non beginner on different subjects :
- comrehensive information on run-time librairies and their ideology (ie memory working, the dipatching of messages between objects and their ordonation, error enhancing with (very) old dlls)
- fuzzy logic
- neural networks
- algorythms of mostly used video and audio formats (compilable and shareware if exists)
- a comprehensive one on multithreading and if possible parrallelism
thanks if you can help me, being jobless i prefer stuff on line or in numereical form
styx
|
|
|
|
|
Hi,
I am new to VC++ and would like to know that if I have a C++ console
application and want to add it to a VC++ MFCAppwizard project, how do
I do it? The problem I am facing is thatwhen I add those .cpp files to
the project, I am unable to compile the code as the compiler
apparently is unable to resolve classes defined in the console
application. To give you the exact nature of the problem, I have a C++ console application which I want to import to VC++ and add forms and UI.
Is this problem something to do with "using namespace .."? I
would like to get some pointers on how to solve this problem.
Thanks.
Sid
|
|
|
|
|
It's highly unlikely that your default code is using namespaces, if you've put stuff in a namespace ( and good for you if you have ), then you just need a using statement to scope it. You should just be able to add your classes, unless your classes rely on libraries that your MFC project does not use, then you need to add them to the project settings. Again, unless you added them to the C++ console project, I don't see this being the case. What errors do you get ? It's kind of hard to help you fix a problem if I don't know what the actual problem is
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi,
May be very simple question, but I can't find the answer. Please help me.
class A{
public:
const int My_some_const;
int k;
A(int k_):k(k){};
}
class B:public A{
B(int k):A(k) //<---How to initialize Mysome_const without passing the value througth constructor of A????
}
Thanks in advance,
Boni
|
|
|
|
|
Boniolopez wrote:
How to initialize Mysome_const without passing the value througth constructor of A????
Why? What's wrong with using the constructor?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
The constructor of B must have the described signature (specific for the application)
|
|
|
|
|
Boniolopez wrote:
The constructor of B must have the described signature
Sorry, I still don't understand what the problem is. Are you saying you're not allowed to explicity call A's constructor?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
class A {
public:
const int My_some_const;
int k;
A(int k_) : k (k) {};
}
class B : public A {
B(int k) : k(k), My_some_const(1) { };
}
Is that what your looking for? That initialises both member variables without going through the base constructor
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hi Alan,
I want to do exactly das wat you wrote. Unfortunetly your solution (was my solution too is not compilable. It produces error C2758. The same stuff with tamplate produces error C2614.
Any help is very appreciated!!!
|
|
|
|
|
When looking form base class, it dosen't know someone is going to derive from it and its const will be initilized there.
There is no spoon.
mail
|
|
|
|
|
You can't use the assigment operator to intialize My_some_const because My_some_const is a const member of the class and cannot appear on the left side of an assignment statement. The only way to initialize My_some_const is via constructor member initialization list.
That initializes My_some_const to 10:
class A{
public:
const int My_some_const;
int k;
A(int k_):k(k),My_some_const(10){};
}
class B:public A{
B(int k):A(k)
}
|
|
|
|
|
|
Hi there,
I have an mdi app, child window containing a cscrollview. Obviously the user can create new child windows using the window>New Window menu item. When they have created more than one view, I would like the multiple child windows to scroll synchronously. I mean that when an active child window's view is scrolled, all the other child window's views scroll along at the same time.
I can't think of a way to do this! I tried maintaining a CPoint in the document class, updated by the view whenever it is scrolled, and adding a ScrollToPosition command in the update function of the view. But it was very messy and didn't quite work correctly.
Does anybody know if there's a neat clean way I can do this, perhaps sending windows messages directly between child windows or something?
Thanks for any help,
Mick
|
|
|
|
|
mickelliot wrote:
When they have created more than one view, I would like the multiple child windows to scroll synchronously.
Any reason why? The whole point of the New Window menu item is so that users can see different parts of the same document at once. Having them all automatically scroll to the same point sort of defeats the purpose.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi Ryan,
Thanks for replying.
The idea is that each view will contain the same view of the same data, but with different parameters so that the view "looks" different. I can best explain myself by asking you to imagine an MDI bitmap editor. You load in a bitmap, which appears in a new child frame, and set its magnification to 100%. You then open a new window and set the magnification of the new view to 200%. Now, when you scroll around the 100% view, you want the 200% view to move along with it appropriately (i.e. in the same direction and twice as fast), so that each view contains the same area of the bitmap but just at different magnifications.
The idea would be to make this an option for the user - i.e. they can either open two child windows and use them to view different parts of the document, or they can adjust the parameters of each view and synchronize the two windows.
Mick
|
|
|
|
|
One way would be to handle WM_HSCROLL and WM_VSCROLL in each view. Whenever the view is scrolled, get the current scroll position. Each document (GetDocument() ) has a list of all the views attached to it (GetFirstViewPosition() , GetNextView() ). Just loop through for each view and call SetScrollPosition() .
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I'm writing a dialog based application.
I'd like to know how to show an animation on the dialog!!
Please Help Me!!!
Thanks in advance!!!!
|
|
|
|
|
An mpeg using DirectX or MediaPlayer is the obvious choice, I guess.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
if you looking for Image Animation,then go for any good image library
that will solve your problem.
One Good Image Library IS 'CXImage',search for it IN CP
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hi
if you wanna play some AVI file on your dialog then you can do it via CAnimateCtrl class provided with MFC
cheers
Azam
|
|
|
|
|
Thanks to all of you on yours suggestions!!!!!!
|
|
|
|
|
Hello,I have the following project and I have tried and tried but can't seem to get it. Can anyone help?
I have to write a program to campare the secant method with newton's method for finding the roots of each function:
x^3 - 3x + 1 with starting point Xo=2
x^3 - 2 sin x with starting point Xo=.5
The instructions also state to use the X1 value from Newton's method as the second starting point for the secant method and to print out each iteration for both methods. I appreciate any help.
|
|
|
|
|
hi,
first you must know how to create a simple application and include graphics in it. I can't learn that, if u don't know buy a book like "C++ for the dummies"
I will assume that you have at least basics skills in developing apps and will just describe the method you must use to make your project ; especially i will not discuss implementation solutions you use, nor the old-fashioned question of object oriented versus linear
For the numerical :
first : write on paper both newton and secant mehod, analytical (ie on paper) write the expresion of both methods' algorithm in function of Xo and the function i name F. Dont developpe F, use it as a general function.
second : write a unit that can trace graphically any functions : trace the axis, check with usual functions you knox (log , cos...) then test your two asked functions, name them f1 and f2.
make your grid and your mesh depending of variables and use these to create a zomm(in and out) that you can use while the app is running.
third : in another unit write a method that give a solution for each algo(secant/newton) in function of Xo, F, the maximal error requested (MER) and the number of steps(N).
if N=0 say N = maxInt and if n=maxInt-1 exit with an error (maybe yours
check it with the simplest functions whose roots are trivial
fourth : put everything together and answer what you are ssked.
critic the different methods, i guess that's where your professor want to lead you.
for personal purpose can u tell me where/major/university/level of your studies. just for curuiosity
free exchanging : france, maajored in physics, PhD in computer science applied to physics in paris
if you are a great C++ developper you can add some stuff :
- possibility using keyboard naturally to enter any usual function and compare each method for it, auto-mesh, auto-Xo and auto-grid
- add others root finding methods (polynoms solving, multiples roots, properties of F and its derivative...)
- point at problematic cases
good job and if you want details ask
PS : if you are very rich, being jobless, i could help you more and more....
styx
|
|
|
|
|
I am trying to Overlap an image (bitmap, jpg, whatever) onto a live video stream. The idea is that a user is supposed to line up the camera with known lines to make future calculations eaiser.
What the intent is that the user will see a transparent (ghost) image of what the camera SHOULD be pointing at and line up the camera to match this ghost image. I find this idea better than simply displaying this image on the side. An overlay would be ideal.
Has anyone done something like this or have any clue how I would do this? Would I need Direct X? VFW?
Thank you in advance!
|
|
|
|
|
tlerner wrote:
I am trying to Overlap an image (bitmap, jpg, whatever) onto a live video stream.
DirectShow is perfect for this. It supports mixing video streams (or videos streams and a static bitmap) natively. Look up the Video Mixing Renderer (VMR).
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|