C++ Problems...
-
Hey... Im trying to use a small bit of c++ code but have never done a line of it in my life. I am looking for some help porting it into something readable. Doesn't have to be another language, I just need an explanation on whats going on. I would learn some cpp myself but honestly I really don't have the time. Any help would be greatly appreciated. Thanks
-
Hey... Im trying to use a small bit of c++ code but have never done a line of it in my life. I am looking for some help porting it into something readable. Doesn't have to be another language, I just need an explanation on whats going on. I would learn some cpp myself but honestly I really don't have the time. Any help would be greatly appreciated. Thanks
Ok...perhaps you could post the code here? Otherwise we cannot offer an explanation of it.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango
-
Ok...perhaps you could post the code here? Otherwise we cannot offer an explanation of it.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango
Cool, didnt get an email notifying me of a response.. sorry it took so long. Heres the code. Its from a Microsoft sample app for creating a voice font, for SAPI. /****************************************************************************** * mkvoice.cpp * *-------------* * This application assembles a simple voice font for the sample TTS engine. *Copyright (c) Microsoft Corporation. All rights reserved. * ******************************************************************************/ #include "stdafx.h" #include #include int wmain(int argc, WCHAR* argv[]) { USES_CONVERSION; static const DWORD dwVersion = { 1 }; ULONG ulNumWords = 0; HRESULT hr = S_OK; //--- Check args if( argc != 4 ) { printf( "%s", "Usage: > mkvoice [[in]word list file] [[out]voice file] [voice name]\n" ); hr = E_INVALIDARG; } else { ::CoInitialize( NULL ); //--- Open word list file and create output voice file //--- _wfopen is not supported on Win9x, so use fopen. FILE* hWordList = fopen( W2A(argv[1]), "r" ); FILE* hVoiceFile = fopen( W2A(argv[2]), "wb" ); if( hWordList && hVoiceFile ) { //--- Write file version and leave space for word count if( !fwrite( &dwVersion, sizeof(dwVersion), 1, hVoiceFile ) || fseek( hVoiceFile, 4, SEEK_CUR ) ) { hr = E_FAIL; } //--- Get each entry WCHAR WordFileName[MAX_PATH]; while( SUCCEEDED( hr ) && fgetws( WordFileName, MAX_PATH, hWordList ) ) { ULONG ulTextLen = wcslen( WordFileName ); if( WordFileName[ulTextLen-1] == '\n' ) { WordFileName[--ulTextLen] = NULL; } //--- Include NULL character when writing to the file ulTextLen = (ulTextLen+1) * sizeof(WCHAR); if( fwrite( &ulTextLen, sizeof(ulTextLen), 1, hVoiceFile ) && fwrite( WordFileName, ulTextLen, 1, hVoiceFile ) ) { ++ulNumWords; //--- Open the wav data ISpStream* pStream; wcscat( WordFileName, L".wav" ); hr = SPBindToFile( WordFileName, SPFM_OPEN_READONLY, &pStream ); if( SUCCEEDED( hr ) ) {
-
Hey... Im trying to use a small bit of c++ code but have never done a line of it in my life. I am looking for some help porting it into something readable. Doesn't have to be another language, I just need an explanation on whats going on. I would learn some cpp myself but honestly I really don't have the time. Any help would be greatly appreciated. Thanks
-
if you want to learn C++, don't use this example !!!! start with the basics, then start learnin at some libraries (Win32, MFC, ATL, ...), and only then, you could read some advanced examples like that.
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
I don't want to learn C++. I was simply asking if someone could point me in the right direction here as to what exactly this code is doing.
-
Basically i just want to change those five or six cpDataKeyAttribs... Maybe I should just compile it, know any free C++ compilers?