CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: egawtry

Page 1 of 5 1 2 3 4

Search: Search took 0.03 seconds.

  1. Thread: plz help me...

    by egawtry
    Replies
    8
    Views
    609

    Re: plz help me...

    Basic Bubblesort: (this should be in your book somewhere)



    int i, j;

    for(i = 0; i < 6; ++i)
    for(j = i+1; j < 6; ++j)
    {
    if( list[i] > list[j] )
  2. Thread: plz help me...

    by egawtry
    Replies
    8
    Views
    609

    Re: plz help me...

    Okay, looks like a standard array. For your program, do the bubblesort like I hope is in your textbook; then you will have:

    12 17 30 45 51 62

    Do a for() loop, adding every other one.

    Ex:...
  3. Thread: plz help me...

    by egawtry
    Replies
    8
    Views
    609

    Re: plz help me...

    What is the list?

    This seems to be an exercise of for() loops. First to sort the array, then to add every other number.

    Hints: i += 2 for the for(), and look up bubblesort for the sort.
    ...
  4. Replies
    18
    Views
    2,737

    Re: File encoding (utf-8/unicode/ascii etc...)

    Just an idea - are you compiling UNICODE or MBCS?

    MBCS will use local code pages and mess up like you are seeing.
  5. Replies
    2
    Views
    681

    Re: dll crashing issue

    You need to post more information.

    1. Is it a regular DLL or MFC?
    2. Does it access any database, if so, do you share it?
    3. What type of interface are you using.
  6. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    I hardly have contempt for higher education, my current work on my masters demonstrates that. I DO have contempt for how CS is taught these days. Graduates leave college with all these bright...
  7. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    I don't agree. That is the way to get a good corporate job, not necessarity be a good programmer. I have worked for corporations and interviewed many prospective new-grads. They were so full of...
  8. Replies
    14
    Views
    2,392

    Re: ComboBox + LPWSTR

    I have written several whitepapers on "Rootbeer" functions (A&W functions) for my work. If anyone is interested, I can dig them up and repost.

    -Erik
  9. Replies
    14
    Views
    2,392

    Re: ComboBox + LPWSTR

    Convert the UNICODE string to MBCS, then insert it.


    size_t size;
    CHAR szString[256];
    wcstombs_s(&size, szString, _countof(szString), (LPCWSTR)strWText, strWText.GetLength());
    //nIndex =...
  10. Replies
    3
    Views
    416

    Re: localhost socket control

    Are you sure you don't mean VB6? Things are not control based in C.

    What you need is to take a look at CSocket and CListen if you are using MFC, and socket(), connect(), and listen() if you are...
  11. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    Правда. :)
  12. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    But the LIB file isn't distributed to end users.:ehh:
  13. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    The only reason I have ever seen, in spite of the "size" issue, is for people who are paranoid about security. It removes all possibility of easily hacking the DLL without having to disassemble it. ...
  14. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    There are quite a few parameters that can be added to a DEF export, most of them unnecessary.

    The NONAME is for the paranoid, I assume that Igor did it out of habit.:)

    The most commonly used...
  15. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    There are 3rd party programs to do this, but most people just dynamically export functions with _dllexport if they are too lazy to use a DEF file.




    That is why I ALWAYS use a DEF file.
    ...
  16. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    True, it would link, but then immeadiately do the function missing popup when run. Sorry for the confusion, I was thinking of a special case.

    -Erik
  17. Replies
    26
    Views
    2,544

    Re: DLL exported functions

    On the DLL end:
    1. Functions are exported by name. If no number is assigned to it, then one is arbitrarity assigned.
    2. Functions can be exported by _dllexport, but if they are C functions, they...
  18. Re: Srand function problem and a different problem

    Note 1: You are already filling the arrays in the declaration. You don't need to implicitly call the function.

    Note 2: Because you are calling srand() both times with time(), which has a one...
  19. Re: Srand function problem and a different problem

    Have you tried moving the using directives to after the includes?



    Where is the index to kartSayilar on the third line in the for loop? I think you want:


    srand(int(time(NULL))); ...
  20. Replies
    1
    Views
    453

    Re: Simple Program, wrong answers

    Try passing references:


    double hatsize(double &h, double &w, double &a, double &hs)
    {
    cout<< "Enter your height in inches: ";
    cin>> h;
    cout<< "Enter your weight in pounds: ";
    cin>> w;...
  21. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    Police??!?:eek:

    I also hate it when someone is peering over my shoulder. If it is my boss, I just grit my teeth and bear it. Anyone else, I tell them to move. One of my main pet peeves.

    As...
  22. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    I don't, except that this isn't Facebook.:eek:

    ====================

    As for your question, what I am saying is that a good programmer needs to understand the fundamentals. It is impossible to...
  23. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    I don't get what his/her parents have to do with it either.

    What don't you get?

    -Erik
  24. Replies
    4
    Views
    997

    Re: WM_SETTEXT in Wind\ows 7

    Sounds like you are using MBCS code and UNICODE flags.

    WM_SETTEXT also comes in rootbeer versions WM_SETTEXTA and WM_SETTEXTW.

    Try specifying which one.

    -Erik
  25. Replies
    22
    Views
    2,536

    Re: How to be a good programmer?

    The way to do that is understand how everything works. Not just the top level functions and operations, but how they actually work.

    For Example: (this is VERY basic, but a simple example)
    C++...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width