Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
X

Xian

@Xian
About
Posts
36
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Screwed up a service.
    X Xian

    I couldn't recompile because the .exe was in use by the system. I managed to get it out via safe mode. Thanks. ---- Xian

    C# question

  • Screwed up a service.
    X Xian

    I accidently screwed up in my OnStart for my service by initializing my main thread before my argument checks and now after uninstalling the service, it is in the state of "Disabling." I've tried rebooting but it won't uninstall fully. I can't reinstall and I can't recompile, so does anyone know what I should do? Thanks. ---- Xian

    C# question

  • try/catch
    X Xian

    Yeah, my main function looks kinda like this :

    XGameObj * pGameObj = new XGameObj();

    try
    {
    pGameObj->initGame();
    pGameObj->startListener();
    pGameObj->gameLoop();
    }
    catch( const char * pszError )
    {
    // stuff
    }

    My support functions in my Socket handler throw back errors and if they are bad then I throw them back to the main loop. Other than that I am not doing much with it. I only throw back to the beginning for irrecoverable errors. I hope this is the "proper" way of doing it. I pretty much just figured it out on my own. I dont try/catch every send and receive, plus this is a console app, so no windows pumps! Every heartbeat the events are fired based on time. Like connections are checked and messages are checked every beat, while updates to the queues may occur every 1 real second, etc. I am pretty much just making it up as I go along :) Peace.

    C / C++ / MFC help game-dev sysadmin performance question

  • try/catch
    X Xian

    No text :) ---- Xian

    C / C++ / MFC help game-dev sysadmin performance question

  • Is there a memory limit for the "new" operator?
    X Xian

    I've read there is a 64k dynamic allocation limit on arrays. ---- Xian

    C / C++ / MFC performance help question

  • try/catch
    X Xian

    I was wondering how many people base their error trapping on try and catch? I read in "Game Programming Gems" that exception handling was "expensive" and I wanted to know if anyone has felt this impact? I am writing a multi-client nonblocking telnet server app and speed can turn into an issue. Would I be better off to do a tradition bool or int error returns? Any input would rock! ---- Xian

    C / C++ / MFC help game-dev sysadmin performance question

  • operator overloading
    X Xian

    void XSocket::bindAddress()
    {
    if( ::bind( m_hSocket, ( LPSOCKADDR )m_pAddress, sizeof( SOCKADDR ) ) == SOCKET_ERROR )
    throw "bindAddress";
    }

    Well, not anymore...:-D I got around this by not overloading operators and calling member funcs explicitly. It still p1ss3s me off though! I think the "this" pointer within a class should reference the class it is within. Peace. ---- Xian

    C / C++ / MFC wpf wcf help question

  • operator overloading
    X Xian

    Here is my problem! I have three classes set up sort of like this: class MainClass { CSocketClass * pSock; // instance of my socket class. } class CSocketClass { CSocketAddr * pObj; }; class CSocketAddr { operator LPSOCKADDR() { return ( LPSOCKADDR )( LPSOCKADDR_IN )this; } } When I call my MainObject->pSock->bind() [which uses my LPSOCKADDR override] and try to do some binding, the pointer this does not refer to the class I called it from, it points back to my main object! That is bunk! When I say "this" I want the class I am calling in. Is it just me? Peace. ---- Xian

    C / C++ / MFC wpf wcf help question

  • how do u convert a char to an int?
    X Xian

    Ok, it depends on what you want to do though. Are you talking about having a character such as '4' which you want the value 4? Or are you talking about what the Graus-man said and want the ASCII value of the character? Here is an example:

    #include <stdio.h>
    #include <stdlib.h>

    void main( void )
    {
    char c = 'A';
    char d = '4';
    int i = 0;

    printf( "Character '%c' is %d in ascii.\n", c, c );
    printf( "Character '%c' is %d in ascii.\n", d, d );
    printf( "Character '%c' is %d as an integer.\n", d, atoi( &d ) );
    }

    That yields the output :

    Character 'A' is 65 in ascii.
    Character '4' is 52 in ascii.
    Character '4' is 4 as an integer.

    I hope that helps you out! ---- Xian - www.hollowmedia.net

    C# question c++

  • DSL, anybody?
    X Xian

    Word to the wise. If you are in America and your DSL service provider happens to be Verizon - DialUp is better. I have had nothing but problems in the past 3 months with them and I know 3 other people who told me the exact same thing. As far as the 1 Gig transfer rate - Do you plan on downloading movies, music, or anything of that nature? 1 Gig was generally about 1 day for me when I had DSL. It all depends on the nature of your usage. ---- Xian

    The Lounge question

  • Spaces vs. Tabs
    X Xian

    If you like a certain tab feel then when you start set your "Tabs are Spaces" if you use Visual Studio, then set it to what you want. Let us say 2, as I do. Then when you are done coding you can go and click Edit->Advanced->Tabify and it will change all of your groups of 2 spaces to tabs (I believe it does all of them, maybe just leading...I dont know). Then when you distribute your code (if you care) then whoever maintains it can see it how they want. That way you don't end up with the "mix" of spaces and tabs that I *ALWAYS* end up with when I dont set tabs to spaces. ;P Plus - I like to open my .cpp files in Notepad from time to time and as we all know the tabs in notepad are 8 wide, and most of my code gets scrolled. That angers me! :mad: Peace! ---- Xian

    The Lounge visual-studio architecture question

  • basic question
    X Xian

    Read this : http://www.codeproject.com/string/cstringmgmt.asp ---- Xian

    C / C++ / MFC question c++ help tutorial learning

  • <i>Your</i> God
    X Xian

    I always appreciated the parallel between an atom and our solar sytem, universe, and galaxy. If a human lives 100 years and a fly lives 1 day who has led a longer life? A fly's perspective may be so askewed from ours that its birth, infancy, maturity, and death may all seem to take the same period of time as our life process. Could that be why it is so hard to kill a fly? Maybe time is slowed down for them. With that same perspective one may wonder if we are but an atom on a blade of grass in a galaxy within a galaxy. Our life span seems long and our planet seems as it has been around forever, but maybe not in respect to the inhabitants of the outer galaxy. One day life will all end for us only because a child was outside playing or a lawn mower passing by. It may seem far fetched but looking at it from the outside in it is less difficult to conceive. I don't necessarily believe that to be fact but I have a lot of theories when it comes to life and the universe. It is fun to wonder! But where does a God fit into all of this? As a human with a very small understanding of what's real outside of what is for me, I can't comprehend time as anything but a timeline. Infinity is a concept that no one can truly grasp because we can't experience it. If everything is infinite and their was no true begining then where did everything come from? As a person I require a start and finish to anything...seems that everyone is more focused on the finish than the start though. But if time and space isn't infinite, how did it start? Where are the borders? If you hit the END of the ABSOLUTE universe is it a wall? Will it absorb all matter that crosses that line? When I die, if there is a heaven and creator, as I hope there is, I have so many questions that need answered. Maybe we aren't supposed to really know? :) ---- Xian

    The Lounge question discussion

  • Proper implementation of ComboBox
    X Xian

    MFC - Ok I have a combobox (m_cFilters) and in it I have Filters like: All Files (*.*) Text Files (*.tx) ...etc. I want to grab the part between the parenthesis and store it in a var after the combo box is changed (DropDown combo, btw). I tried mapping the standard combo messages but after the functions return they do not update the combo box. What is the proper way to get the effect I am looking for? Is there an easier way to grab data like this other than straight from the combo string? Thanks. ---- Xian

    C / C++ / MFC question c++ announcement

  • Directory Selector Dialog
    X Xian

    You rock, thanks. ---- Xian

    C / C++ / MFC c++ question

  • Directory Selector Dialog
    X Xian

    Does a Directory Selector Dialog exist as a standard dialog in MFC? I know it isn't a common dialog (unless FilePicker is configurable), but if it exists already I don't want to reinvent the wheel. If it doesn't exist, I guess I get to make one myself! Woo! Thanks. :) Platform: Win2k Lang : Visual C++ with MFC ---- Xian

    C / C++ / MFC c++ question

  • Gonads and strife...
    X Xian

    http://www.threebrain.com/weeeeee.html If you haven't seen this flash movie, do yourself a favor. I laughed for 106 hours after seeing it. ---- Xian

    The Lounge html com adobe

  • Sharing a DSL Connection
    X Xian

    I have a Linksys 8 port and it works great. Only one small complaint : The power cable doesn't push in very far, so if you move it around you may lose connection. ---- Xian

    The Lounge sysadmin

  • Outside work
    X Xian

    www.realdoll(s?).com Now there is an expensive hobby for ya. ---- Xian

    The Lounge question

  • The end of Software Development as a profession
    X Xian

    I prefer Samuel Adams. :beer: ---- Xian

    The Lounge css com linux business question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups