|
please tell me, i want to know it very much... thanks!~
|
|
|
|
|
c++ is a programming language that uses object oriented paradigms.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hey now. You can use object oriented paradigms with C++, as well as procedural and functional paradigms. It isn't necessarily OO, which is exactly what makes C++ great.
--
If there was a problem, Yo, I'll solve it!
Check out the hook while my DJ revolves it.
|
|
|
|
|
|
For a simple and nice intorduction to CPP, please refer the following link. Dont worry. its too simple. And you can find many simple tutorials about CPP for beginners in this site.
http://cprogramming.com/begin.html[^]
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
I'm trying to write a program that will retrieve a list of file names (under windows) from a folder (e.g - Atually tell me (or the program) what the folder contains).
When it has the list of names, I want the program to copy the respective files to a different folder and then rename them systematically (e.g - 1, 2, 3, 4, 5...etc).
Later on, I want the program to give the copied files the same names as their original files.
(The files will either be (.doc) or (.html))
I've pretty new to programming, and have read about file streams, but have only managed to find out how to work with them when I know the filename beforehand (e.g - "File.open ("Doc1.txt", ios::out); ").
I'd be grateful if anyone could help me out with this, or at least give me the title of a book that might explain things.
Hope you can help.
Thanks!
|
|
|
|
|
First, the file enumeration. You can use the MFC class CFileFind to enumerate a directory for files. You can extract each filename in question seperately from the object, there is a member function available that will return the filename of a matching file.
Using this filename, you open the file into a CFile object. Then, you construct and create a new CFile object to the target directory. After that, it is just reading from the first CFile stream and writing into the second one.
Alternatively, if you are not bound to platform-independency (that is, you can use system console commands), then you should consider using the system to copy files directly. For example, commanding system("copy *.* <target dir> ) would copy all files to the target directory on a Windows platform.
See the documentation for CFile and CFileFind. These MFC classes encapsulate the Win32 API concepts File and FileFind. Both MFC documentations have links to the respective Win32 ones if you are unable to use MFC.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I suggest taking a look at this API functions in your MSDN documentation
CopyFile()
MoveFile()
FindFirstFile()
FindNextFile()
FindClose()
you can go thru an entire directory (or even drive)with the Find functions, writte your own file-renaming alogarithm via CString manipulation routines (or just the good old strcat, strcpy, etc), and use MoveFile() and CopyFile() to rename / copy the files.
As a tip, i suggest using a recursive function to do the file ennumeration.
HTH.
|
|
|
|
|
I want to detect if an application on the desktop (other than my application) has fired up a file open or file save dialog?
In other words I want my application to receive an event when any application on the desktop causes a file open/save dialog to pop up.
Is this possible using hooks? If so then how?
Any suggestion would be greatly appreciated.
Thanks in Advance.
Regards,
Zahid
|
|
|
|
|
Install a WH_CBT hook and check the classname of every window created , if it matches the FileOpen Dialog's classname do ur stuff
Hope it helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
hy there,i would like to make a software, who can learn if a .jpg of a human is male or female. the software should use a neuronal network. the idea is, that first i view some hundret pictures of people, and always click male or female, then, the network tryes to learn, and should be able to decide if a picture is male or female. does anybody can give me tips, how i can do this?
is there code available for the neuronal network things?
i would be very happy for input!
thanx a lot!
|
|
|
|
|
1. You are probably searching for the wrong words, that's why you didn't find a lot of articles here. The common English term is 'neural networks', not neuronal. Here on Codeproject there is a great series about AI algorithms, including neural networks, made on C#, but it should be clear enough for anyone who knows C++.
2. A neural network (NN) is usually not the full solution. In an OCR, as an example, you can't feed the NN with a bitmap and have all the chars on the other side. The NN only takes place when it is needed to 'find something similar'. There are lots of other things involved in an OCR, like identifying lines of text, separating chars, decomposing chars on vectors for font independance, and then, the last step is the NN. I did an OCR for damaged images in the past and I know that the NN is the easiest part.
In your case, you won't be able to feed a NN with a image and train it to detect if it's a male jpg or a female jpg, unless the samples are really limited. The solution is much more complex, and involves separating the image in its components, like hair, eyes, nose, mouth, etc, vectorizing them in some form and only then feeding the NN with those vectors and classifying them as male or female.
Again, it's not an easy task to do, and it would certainly not be the first NN I would do. You should start with simpler examples first.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
I am working on project of Map vectorization as my senior design project in university.As part of project. I want to extract labels out of map (OCR) one big benfefit i have is that i know color of text so i can seperate text from other image.. Can u please elaborate more how u did OCR???
in my case i dont need to seperate text from image, i will get it through color.. i have studied Artificial Neural Networks course in my univ... Which ANN did u used?? Back propagation?? counter propagation or radial basis? what features u fed as input vector to NN??
I am already doing image vectorization.. till now i am finding closed colour contours, intersection points etc and my final output is vertices and edges ( vectors).. So please tell me in this perspective
can i get copy of ur project to see how it works ( IF possible???)
ANY HELP IN THIS REGARD WILL BE HIIIIIIIIIIIIIIIIIIIIIIIGHHHHHLLLLLLLLYYYYYYY
APPRECIATED... OFFCOURSE I WILL MENTION UR NAME IN MY PROJECT REPORT ..
THANKS IN ADVANCE
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
M.Shoaib Khan wrote:
Can u please elaborate more how u did OCR???
Geez, this deserves an article series, but I'll try
M.Shoaib Khan wrote:
one big benfefit i have is that i know color of text so i can seperate text from other image..
This is great. Don't forget to allow some small variations on the color to get the full char. To separate chars, a simple scan for an empty vertical space is enough. If they are 'glued' together, the algorithm is a bit more complicated, and you'll need to add vertical lines to the char until the network can recognize something.
M.Shoaib Khan wrote:
Which ANN did u used?? Back propagation?? counter propagation or radial basis?
This was the scariest part, I was afraid that I would need a very good NN, but in the end, it was just a simple perceptron, with some hidden layers and had a very good performance (it was both fast and accurate). I noticed that the first steps were much more determinant on the OCR's performance than the NN itself.
For the feature extraction, I don't remember the algorithm name right now. It was not invented by me, and seems to be used by several omnifont OCRs. The algorithms I used both reduced the resolution and the size of the chars (all of them need to be the same, normally). So, I created a grid like this:
...|...|...|... ...|...|...|...
..1|..2|..3|... ...|.xxXxx.|...
...|...|...|... ...X...|.xx|...
---+---+---+--- --x+---+---X---
...|...|...|... ..x....|...X...
..4|..5|..6|... ...XxxxxxxxX...
...|...|...|... ...Xxxx|.xxX...
---+---+---+--- ---XX--+---X---
...|...|...|... ...X...|...X...
..7|..8|..9|... ...XX..|..XX...
...|...|...|... ...|...|...|...
The numbers are IDs of the segments, and you can do this on the horizontal segments too (I just didn't to make the text more clear). Basically, you get the image and draw those imaginary segments. You then mark if (or how many times) those segments have been crossed, so you can detect horizontal, vertical and diagonal line features and each feature is an input node of the NN. Add some hidden layers (this will need tweaking, but I had success with sizes x, x/2, x/4) and the output layer is just a sequential ID for the char (0 for 'A', 1 for 'B'...)
Unfortunately, this code is part of my product now, so I can't give you a copy.
I didn't need to do image vectorization, so I don't have any experience with it.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
hy, i have written an exe and a dll. the exe uses a class in the dll.
in this dll- class i have some CString members. now, when i debug i see the
following: in the constructor, everything is fine, all strings got initialized and have valid adresses. now in a subsequent functioncall, every
CString Member has the adress 0x000000 except the one who was first declared in the class. i have no idea, what the problem could be!
has it something todo with the dll?
please help me!!
thanx
|
|
|
|
|
Sounds like it is an IDE feature, not C++ design.
Kuphryn
|
|
|
|
|
hy, sorry, i do not understand your answer at all, could you please explain?
thanx, greetz
|
|
|
|
|
I am saying the problem is with Visual C++ debugger, not your application.
Kuphryn
|
|
|
|
|
hy, i dont think the problem is the debugger,or how could this be?
what am i doing wrong? im working with visual c++ since 2 years now, and never experienced a similar problem. how can i solve the problem?
|
|
|
|
|
Probably you are doing something like this: (normally more complicated, but the same thing)
CString *p = NULL;
p->Trim();
Calling a method on a NULL pointer may cause the problem you're describing.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
I think that you don't get the point of what he is asking. I think that he wants to know WHY the subsquents aren't initialized. You are only showing the effect of it, but I think he is AAAARGH-ing about the not-being-constructed of the CString-members in his class.
And btw, I have no idea what he could be doing wrong. This is really weird... a member var should be constructed if it shouldn't be a pointer but a physical instance...
|
|
|
|
|
I have been using GetOpenFileName for quite some time in many programs to open files. However, I have not found a way to select what "view" style is used with the Open File Dialog appears such as "Thumbnail", "Filmstrip"...so on.
Is there a way of pulling up the Open File dialog and defaulting that dialog to be one of the views such as "Thumbnail"?
|
|
|
|
|
Hi,
I would like to get the source code for an Editor (in VC++), with Auto-complete feature,and syntax highlighting, just like what we have in Visual Studio. pl. send me the URLs / Project name, if you have come across any thing like that in the net b'for.
Thanks in Advance
Jagadeesh
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
You could try looking at "Crystal Edit" and "Brainchild", for syntax coloring, at codeproject. As for Auto-complete, you may what to search www.sourceforge.net.
INTP
|
|
|
|
|
Just found this "Using Scintilla for syntax coloring in MFC" at codeproject.
The article recomends going to www.scintilla.org for information on regular expressions, auto-complete, etc...
Good Luck!
INTP
|
|
|
|
|