|
Hello,
Define efficient! If you mean that you wan't to transfer files as fast as possible, I cannot help you.
If you mean that your application doesn't block when you send the file, try multithreading and asynchronous IO.
You can aslo try IO Completion Ports. Do a search here on CP for IOCP and you'll get plenty results.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
This has to exist, but I cannot find it.
I want to know if there is a VS feature to allow me to quickly navigate in my Class Browser. All of you know that when you click on a method in class browser, the tool takes you to the source code... fine.
I want to go the other way. Given a location in the editor, I want VS to open up and position the class browser appropriately. If you are familiar with VS Help, you can open a help topic and then press Locate to access the current location in the TOC.
Ideas?
C. Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
|
|
|
|
|
I think cab file usage comes very often. Do you have any suggestions on 'what compression utility or tool to use which can be maintained inside a program'? could it be zip files or something else?
|
|
|
|
|
Google[^] tells me there's a cab SDK.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think that's the cabinet sdk from microsoft. These are the FCI and the FDI. But it's very hard to incorporate these functions in your program especially if your a beginner like me. Though I tried to incorporate these functions into my program but I ended up in an 'unexpected end of file' error after a lot of editing just for these functions to work on my program in Visual C++. I guess i'll just have to trash the idea of using cab files and try to look for other file compression format
|
|
|
|
|
How will I declare a global variable in VC++? I have created a struct on one of my class (lets say class1) after the #include.... It was included in the Global folder in the class view tab but when I'm going to access it on a different class (class2), the error is "undeclared identifier". I've tried to put the struct on the header file of class1 but a linker error occured. How will i be able made a struct be accessible by all of my classes? Thanks, I'm really stuck
|
|
|
|
|
You can put your definition of your structure in any header file. To create a global variable for your struct, you can declare it in a source file. When you need to access this in another file, declare it again but with the extern keyword. E.g.
struct MY_STRUCT {
...};
#include "File1.h"
MY_STRUCT myStruct;
#include "File1.h"
extern MY_STRUCT myStruct;
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
I thought redeclaring the struct will reset all its values or perhaps reinitialize them.
|
|
|
|
|
Hello...
benjnp wrote:
I thought redeclaring the struct will reset all its values or perhaps reinitialize them.
No, only without the extern keyword... With the extern keyword you can declare global variables over many files without to reset them... They will be all associated to the first declaration...
|
|
|
|
|
Global variables are almost always a bad idea. You're better off creating a class with a static public variable. The main reason is that you have some ability to control/track access of the variable that way.
The easiest way to add a global is to declare it in your stdafx.cpp. You may need to declare it in stdafx.h, but I'm pretty sure from memory that stdafx.cpp is the place to make it visible across your app.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
The easiest way to add a global is to declare it in your stdafx.cpp. You may need to declare it in stdafx.h, but I'm pretty sure from memory that stdafx.cpp is the place to make it visible across your app.
Yes you are right. Create the global variable in stdafx.cpp and the extern part in stdafx.h and bingo!
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
so would it mean that I'll just have to create my struct inside a class?
|
|
|
|
|
If you were going to have a global as a static property with get and set methods in a class, then yes, you'd define the struct in the same header file, before you defined the class. Or define it in the CPP and forward declare it, if you choose to store it as a pointer.
If you put it in stdafx, then you define it in stdafx.h, I would have thought.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I guess i'll just have to do it in stdafx.cpp and stdafx.h., thanx
|
|
|
|
|
Well, you can do it either way, but doing it in a class is definately better, and no harder.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I've placed the struct on stdafx.cpp then the extern part on stdafx.h. But 'undeclared identifier' error still occurs
|
|
|
|
|
oh.. undeclared identifier is no longer the error. The error now is at the stdafx.h. I guess I've placed it in the wrong area. Where am I exactly allowed to place the externs? Sorry for the disturbance
|
|
|
|
|
benjnp wrote:
The error now is at the stdafx.h.
What error?
benjnp wrote:
Where am I exactly allowed to place the externs?
After those includes
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
k thanx
|
|
|
|
|
Hi, CPians!
Problem: I gonna be in charge of my local 'POLICE' to write an application which is able to recognise speech(human voice) and handwriting of my native language and local peoples.
Please, Help me in:
I have not any idea of the required process.(Speech recognition,image processing,... )
-Do I accept it or not?<br />
-How many days, Months, or years!! it might take?<br />
-Where can I find any links or helps on this topic?
Thank you so much in advanced.
Help me please. All in front of me is darkness now, I need a light of information and knowledge.
Any, any help would be appreciated.
|
|
|
|
|
Hamed Mosavi wrote:
which is able to recognise speech(human voice) and handwriting of my native language and local peoples
Great....
Hamed Mosavi wrote:
Do I accept it or not?
I think we both know the answer. Lets review the facts:
1. You don't know how to do the job
2. Products that do this cost a lot of money ( therefore are not trivial )
3. The police have guns.
Hamed Mosavi wrote:
How many days, Months, or years!! it might take?
days ? LOL
Hamed Mosavi wrote:
Where can I find any links or helps on this topic?
Google, I guess, but I sure wouldn't take this job. I've taken jobs where I had no idea how to do something, but they were SPECIFIC image processing tasks, an area I am broadly familiar with, and I'd found papers describing different approaches to the problem, so it was a calculated risk. What you're suggesting to do sounds more like madness.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you Mr.Christian Graus.
But Some notes:
-First version will need just to be able to compare two voices saying the same sentence.
-Some years ago I was asked to write my first application which had to convert some data from their old format(in a DOS app.) to new data and insert them into SQL Server. I was a begginer in C++ (now think about VC++ ) but I accepted it(another maddness ) and it was all success
Will this situation not tobe the same?
-- modified at 22:49 Tuesday 13th September, 2005
Well! you are right.
look at my first resault of a google
Handwriting recognition has always been tough problem. It takes years to come to a commercially valuable result in this area - years of research, ...
Why don't think about my university projects, instead
Thank you very much
|
|
|
|
|
Hamed Mosavi wrote:
Will this situation not tobe the same?
No, because the other problem is well documented and commonly done. There were a lot more sources of information available to you, and it was the sort of stuff that a computer does easily, it was not a complex coding task.
Amazon appears to have numerous books on speech recognition, most of which come with toolkits. They are all pretty expensive, but I'd buy a couple and read them before committing to a job like this.
Christian Graus - Microsoft MVP - C++
-- modified at 22:47 Tuesday 13th September, 2005
|
|
|
|
|
Thank you.
I modified last message!
Excuseme, I know it's stupid but, I think thhis sentence is wrong, isn't it?(Will this situation not tobe the same?) could you please tell me the true one? (I'm not english!)
and Thank you very much for your kind answer
lots of, lots of:
|
|
|
|
|
Hamed Mosavi wrote:
Will this situation not tobe the same?)
Wouldn't this situation be the same ?
Christian Graus - Microsoft MVP - C++
|
|
|
|