For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
What is a current C ( ANSI C) standard on putting <b>optional</b> parameters / attributes into function? Or is there such a thing - ANSI standard _ anymore? "Popular" microprocessor compiler does not allow such thing and "workaround" is function overloading. Which IMHO in memory limited device adding more similar functions into code does not make much sense, unless you are memory chips salesman. Cheers Vaclav
#define SPEECH_NONSPEECH "./speech_nonspeech.txt" // Consists boolean array of size equal to total no. of frames, for a speeched frame value is 1 and for nonspeeched frame value is 0.
#define NO_SPEECH_FRAMES "./no_speech_frames.txt"
#define STARTING_POINT "./starting_point.txt"
#define END_POINT "./end_point.txt"
#define ID_EXTENSION "_AM03MENR" // Common extension to all the speaker ID's. AM03MENR - session(A) OnlineMobile(M03) (M)ultienvironment (EN)glish (R)eading
#define FILE_EXTENSION ".wav" // File name extension for wave file
#define AVR_ENR "./avr_enr.txt"
#define PATH_TEXT "./" // Path to the directory which contains all the text files
#define PATH_TRAIN "/home/ast9/text_independent/recorded_files/train/"// Path to the directory which contains all the recorded training files
#define PATH_TEST "/home/ast9/text_independent/recorded_files/test/" // Path to the directory which contains all the recorded testing files
#define PATH_TEXT_MULTI "/home/ast9/textfiles/" //Path to the directory which contains all the multilevel text files.
#define PATH_COUNT "/home/ast9/textfiles/count.txt" //Path to the directory which contains count.txt file.
#define spechmfcc "./"
here is the header.h code.
From this if i try to print the NUM_OF_COEFFICIENTS in main program using
printf("Num of ceptral coefficients=%d",coefficients);
but error is generating undeclared details.
First you need to create a function pf that takes an integer value and prints it somewhere.
Given this and your other questions, I think you would benefit from studying a decent book on C/C++, or search the internet for some tutorials. You cannot learn C programming by just asking questions on this forum.
If you are learning to code, then asking others to code for you is not the way to go. If you are having trouble getting started, you should put some effort into making the game yourself, and then ask when you run into problems.
I want to make a log with errors during the execution of my app. I'm trying to write an event to the windows Event Viewer with a VCL form application with C++ Builder XE5.
I'm using Vcl.SvcMgr.TEventLogger class.
The code in the header file is :
But beside my message, in the error description in the Event Viewer there is a message : "The description for Event ID 0 from source MySource cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted." . How can I remove that description and write only the message that I want? Should I be using other C++ class? I couldn't find any documentation about this class. The idea of using Event Viewer is that when the application is running on an user with restricted rights he won't be able to write to files, meaning I can't just type into a ".txt" file. If anyone else has a different idea how to make a log with errors, please share!
If I remember corrctly, you don't pass the message to Event Viewer directly, but you pass an application name and message id. You need a DLL that contains the texts to the ID (don't ask me in what format). And you need a specific registry key (in local machine I think) pointing the Event Viewer to the path of the DLL. We also used this approach long ago in one of our applications but aren't using it anymore because it's so complicated.
I would suggest the user needs to at least one directory where he/she has write permission. You could then enter the directory into some kind of ini file, read it on application start and write the log file into that directory.
The good thing about pessimism is, that you are always either right or pleasently surprised.
Hi i am writing a simple app with doc/viw architecture, now i have to buttons in the Outlook bar "Folders" and "Calendar" now i want that when restart the app the selected pane will be always the 0 -> "Folders" now i tried this: