Search Results

Search found 397 results on 16 pages for 'c 0x'.

Page 11/16 | < Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • busybox shell refuses to execute the particular line of script

    - by neil1234
    Hi, I am using busybox shell to execute a script which the bash executes when i boot linux using the nfs. Please let me know the correct alternative for this line. cur_major=$((0x`stat -c %t $dev 2>/dev/null`)) The busybox throws in an error saying "0x" syntax error, which i understand is the problem with the syntax of this line. Thanks in advance

    Read the article

  • Jboss logging issue

    - by balaji
    our application is deployed on jboos As 4.0x, we face some issues in jboss logging.. whenever the server is restarted, jboss stops logging , and there is no update in server.log. After that it is not updating the log file. then we do touch cmd on log4j.xml, so that it creates the log files again. Please help me in fixing the issue we cant do touch everytine. we face this issue in both the nodes. thanks, balaji

    Read the article

  • Jboss Logging isssue

    - by Balaji
    our application is deployed on jboos As 4.0x, we face some issues in jboss logging.. whenever the server is restarted, jboss stops logging , and there is no update in server.log. After that it is not updating the log file. then we do touch cmd on log4j.xml, so that it creates the log files again. Please help me in fixing the issue we cant do touch everytine. we face this issue in both the nodes. thanks, balaji

    Read the article

  • some troubles with WPF and Windows XP

    - by Sorush Rabiee
    is .net framework 3 compatible with xp? i install visual studio 9.0 (.net 3.5) on win XP. when i compile a WPF project and try to run it, this error occurs: cannot initialize application ...... at address 0x<some digits> (antivirus protection is off) after first fail of wpf, all other project types (windows application, console &...) after compiling don't run. where is problem?

    Read the article

  • Purpose of Explicit Default Constructors

    - by Dennis Zickefoose
    I recently noticed a class in C++0x that calls for an explicit default constructor. However, I'm failing to come up with a scenario in which a default constructor can be called implicitly. It seems like a rather pointless specifier. I thought maybe it would disallow Class c; in favor of Class c = Class(); but that does not appear to be the case. Some relevant quotes from the C++0x FCD, since it is easier for me to navigate [similar text exists in C++03, if not in the same places] 12.3.1.3 [class.conv.ctor] A default constructor may be an explicit constructor; such a constructor will be used to perform default-initialization or value initialization (8.5). It goes on to provide an example of an explicit default constructor, but it simply mimics the example I provided above. 8.5.6 [decl.init] To default-initialize an object of type T means: — if T is a (possibly cv-qualified) class type (Clause 9), the default constructor for T is called (and the initialization is ill-formed if T has no accessible default constructor); 8.5.7 [decl.init] To value-initialize an object of type T means: — if T is a (possibly cv-qualified) class type (Clause 9) with a user-provided constructor (12.1), then the default constructor for T is called (and the initialization is ill-formed if T has no accessible default constructor); In both cases, the standard calls for the default constructor to be called. But that is what would happen if the default constructor were non-explicit. For completeness sake: 8.5.11 [decl.init] If no initializer is specified for an object, the object is default-initialized; From what I can tell, this just leaves conversion from no data. Which doesn't make sense. The best I can come up with would be the following: void function(Class c); int main() { function(); //implicitly convert from no parameter to a single parameter } But obviously that isn't the way C++ handles default arguments. What else is there that would make explicit Class(); behave differently from Class();? The specific example that generated this question was std::function [20.8.14.2 func.wrap.func]. It requires several converting constructors, none of which are marked explicit, but the default constructor is.

    Read the article

  • Howto access thread data outside a thread

    - by Quandary
    Question: I start the MS Text-to-speech engine in a thread, in order to avoid a crash on DLL_attach. It starts fine, and the text to speech engine gets initialized, but I can't access ISpVoice outside the thread. How can I access ISpVoice outside the thread ? It's a global variable after all... #include <windows.h> #include <sapi.h> #include "XPThreads.h" ISpVoice * pVoice = NULL; unsigned long init_engine_thread(void* param) { Sleep(5000); printf("lolthread\n"); //HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); HRESULT hr = CoInitialize(NULL); if(FAILED(hr) ) { MessageBox(NULL, TEXT("Failed To Initialize"), TEXT("Error"), 0); char buffer[2000] ; sprintf(buffer, "An error occured: 0x%08X.\n", hr); FILE * pFile = fopen ( "c:\\temp\\CoInitialize_dll.txt" , "w" ); fwrite (buffer , 1 , strlen(buffer) , pFile ); fclose (pFile); } else { printf("trying to create instance.\n"); //HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **) &pVoice); //hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **) &pVoice); //HRESULT hr = CoCreateInstance(__uuidof(ISpVoice), NULL, CLSCTX_INPROC_SERVER, IID_ISpVoice, (void **) &pVoice); HRESULT hr = CoCreateInstance(__uuidof(SpVoice), NULL, CLSCTX_ALL, IID_ISpVoice, (void **) &pVoice); if( SUCCEEDED( hr ) ) { printf("Succeeded\n"); hr = pVoice->Speak(L"The text to speech engine has been successfully initialized.", 0, NULL); } else { printf("failed\n"); MessageBox(NULL, TEXT("Failed To Create COM instance"), TEXT("Error"), 0); char buffer[2000] ; sprintf(buffer, "An error occured: 0x%08X.\n", hr); FILE * pFile = fopen ( "c:\\temp\\CoCreateInstance_dll.txt" , "w" ); fwrite (buffer , 1 , strlen(buffer) , pFile ); fclose (pFile); } } if(pVoice != NULL) { pVoice->Release(); pVoice = NULL; } CoUninitialize(); return NULL; } XPThreads* ptrThread = new XPThreads(init_engine_thread); BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: //init_engine(); LoadLibrary(TEXT("ole32.dll")); ptrThread->Run(); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: break; } return TRUE; }

    Read the article

  • binary number in c++

    - by baash05
    In c++ 0x10 is the way to represent a hex value. if I leave off the 0x then it's dec. Is there a way to define a binary? Not that I can't derive 0x0003 is 11, but it would be cool if I could use 0b0011. It would just make the code a little more obvious.

    Read the article

  • Types questions in ANSI C

    - by shaharg
    Hi, I having few questions about typed in ANSI C: 1. what's the difference between "\x" in the beginning of a char to 0x in the beginning of char (or in any other case for this matter). AFAIK, they both means that this is hexadecimal.. so what's the difference. when casting char to (unsigned), not (unsigned char) - what does it mean? why (unsigned)'\xFF' != 0xFF? Thanks!

    Read the article

  • C++ auto function return type implementation

    - by aaa
    hello. Is there macro, something like BOOST_AUTO, which would allow to emulate automatic return type deduction of function in C++? I mean something like trailing-return-type, http://en.wikipedia.org/wiki/C%2B%2B0x#Alternative_function_syntax thank you

    Read the article

  • Providing *implicit* conversion operator for template specialization

    - by Neil G
    I have a templated sparse_vector<T> class, and I am also using Boost UBLAS. How would I provide implicit conversions between sparse_vector<double> and boost::numeric::ublas::compressed_vector<double>? I would also like to provide similar conversions between std::vector<double> and boost::numeric::ublas::vector<double>. (I am using gcc 4.4 with C++0x enabled.)

    Read the article

  • What is the future of C++?

    - by George Edison
    Given the rise in popularity of C# and others, (which you can point out in the comments) what future does C++ have? Consider that most OS code is a mix of Asm/C/C++ and a lot of FOSS still use it. Also consider the upcoming C++0x standard that brings a few changes to the mix.

    Read the article

  • Rvalues in C++03

    - by DeadMG
    How can you tell whether or not a given parameter is an rvalue in C++03? I'm writing some very generic code and am in need of taking a reference if possible, or constructing a new object otherwise. Can I overload to take by-value as well as by-reference and have the rvalue returns call the by-value function? Or do I have a very sickening feeling that this is why rvalue references are in C++0x?

    Read the article

  • C++ boost wave, scoped macro

    - by aaa
    hello. Is it possible to have scoped macros using custom defined macros through boost wave? I know it should a possible with C++0x however I am working with regular C++. If it is possible, can you provide link or reference how to accomplish this? Thanks

    Read the article

  • How to print 5 byte integer values?

    - by lost soul
    I've just started reading C and have a question about a macro. How can I print a 5 byte integer value (that happens to be defined in a macro)? For example: #define MAX 0xdeadbeaf12 int main(){ printf(" 0x %2x \n", MAX); } This code prints adbeaf12 but not deadbeaf12. How do I get all the bytes printed?

    Read the article

  • How to use 5 byte value in macro

    - by shaktisinha
    Hi All, I've just started reading C and have a question about macro. How can I use a 5 byte value with a macro For eg. #define MAX 0xdeadbeaf12 int main(){ printf(" 0x %2x \n", MAX); } This code prints adbeaf12 but not deadbeaf12. Please help. Thanks

    Read the article

  • Can java do a timer on command line?

    - by javaLearner.java
    HI I am a new java programmer (very new). What I want to do/test is (not sure if its recommendable or doable?), we know that System.out.println("Message"); will output the "Message" in command prompt. Is it possible to display the current time, without having to repeatly use the system.out.println()? Name, like instead of displaying: 10:00:01 10:00:02 10:00:03 I wand to have liek this: 10:00:0X where X will continue counting

    Read the article

  • Can java do a timer on command line by overwriting the time on the same line?

    - by javaLearner.java
    HI I am a new java programmer (very new). What I want to do/test is (not sure if its recommendable or doable?), we know that System.out.println("Message"); will output the "Message" in command prompt. Is it possible to display the current time, without having to repeatly use the system.out.println()? Name, like instead of displaying: 10:00:01 10:00:02 10:00:03 I wand to have liek this: 10:00:0X where X will continue counting

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >