Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. CodingNovice

    How to make substrings and int of a string?

    i think that should be (!str || !*str) first you check the pointer isnt null then you check the strings first byte isnt 0.
  2. CodingNovice

    Overriding New and Delete Operators

    shouldnt that be :- static void* operator new(size_t size, char const* file, int line) and static void operator delete(void* memaddr,size_t size,char const* file,int line) Also in his book effective c++ I believe scott meyers suggests checking the size of the object passed to your operator...
  3. CodingNovice

    Why are STLs not thread-safe?

    There are safe versions about but they operate slower. The basic rationale was that locking is expensive and if you dont need it why pay for it. Its not hard to write a class with a container member and a critical section to sync access to the container. In general where stl containers must be...
  4. CodingNovice

    template template parameters

    If you read chapter 1 you will see this.... template<template<class Created>class CreationPolicy> class WidgetManager:public CreationPolicy<Widget> { ... } I think this says it all really. If you stare at it long enough and reread it a couple of times it will all click into place.
  5. CodingNovice

    Is c language the correct?

    The bootloader will have to be in asm. The kernel is most likely going to be written in a mixture of C and asm. The runtime library will be written in C and possibly asm. The shell especially if graphical is probably going to be in C++, but you can use C. Read Tanenbaums book.
  6. CodingNovice

    Graphics in VC++

    as windows will not give you direct access to the hardware then the answer is no. You can use the GDI to do what you want by making a bitmap from your int array and using BitBlt() to blit it. Draw on a memory DC then blit the memory DC to the screen DC to reduce flickering.
  7. CodingNovice

    C++ Project(s)

    a full shop stock control,contacts and invoicing system written generically so you can tailor it to individual companies using nothing more than a configuration applet or ini files. try to build in printing and generation of invoices and credit notes, stock control,email generation,sorts and...
  8. CodingNovice

    Is this a memory leak?

    Its called return by value. If the function returned a wstring& then that would have been illegal as the wstring being referenced would have been destroyed before the reference was used. But to return an object by value is perfectly feasible tho a little expensive.
  9. CodingNovice

    Multiple Processes vs Multiple Dialogs

    if each process is nicely self contained and can talk using the usual forms of IPC where necessary then that is probably the better solution.
  10. CodingNovice

    Easy way to convert image formats?

    I know gdi+ can do bmp to jpeg and jpeg to bmp. Im not sure if it supports TIFF out the box but might be worth a look. The Image class has some functions to help with conversions.
  11. CodingNovice

    gmtime

    Im sure localtime can do it as well but I dont know anything about C locales.
  12. CodingNovice

    gmtime

    yeah simple if you know the time difference just add it to the hour member of the struct. i.e. gmt to cet #include <stdio.h> #include <time.h> #define CET (1) int main () { time_t rawtime; tm * ptm; time ( &rawtime ); ptm = gmtime ( &rawtime ); printf ("CET now is :-%2d:%02d\n"...
  13. CodingNovice

    Exceptions in VC++ 7.1

    They are access violations caused simply by overwriting the bounds of your array.The exception isnt writing to the memory, you are, thats what causes an exception to be raised. Thats obviously how your compiler/debugger deals with this.
  14. CodingNovice

    Exceptions in VC++ 7.1

    or perhaps std::string ??
  15. CodingNovice

    Exceptions in VC++ 7.1

    use strncpy and strncat.
  16. CodingNovice

    Registry

    I think the installer (which is run under admin rights) should write to HKLM. On first running app in each new user the HKLM key should be read and copied to HKCU. The app will now use the local copy to that current user forthwith. On logging out and logging in with a different user is that user...
  17. CodingNovice

    bitblt

    look up CreateBitmap, CreateCompatibleBitmap etc. and incorporate some bitmap work into your code.
  18. CodingNovice

    bios.h

    There is no such header as bios.h in c/c++. There may be a non-standard header offered by some old 16bit compilers. To access hardware in a real operating system you would need to use the API of the OS in question. On windows for instance there are several functions which can give you controlled...
  19. CodingNovice

    I'm new to C++

    www.bloodshed.net
  20. CodingNovice

    ReadConsoleInput() Limitation Problems (Program Does not Continue)

    GetAsyncKeyState is probably what I would use rather than ReadConsoleInput.

Part and Inventory Search

Back
Top