dcsimg

Search:

Type: Posts; User: dis1411

Page 1 of 13 1 2 3 4

Search: Search took 1.55 seconds.

  1. Replies
    4
    Views
    536

    Re: compiler (lack of) optimization

    I realize preprocessor directives are just a text replacement.. however once its in the code, it should then be optimized.

    I figured out the correct answer. 2^16 is not 2 to the 16th (65536) its...
  2. Replies
    4
    Views
    536

    compiler (lack of) optimization

    i had
    #define DATA_SIZE 65536 and decided to change it to
    #define DATA_SIZE (2^16) // 65536 I thought for sure my compiler would optimize that to a literal constant (65536) but instead it actually...
  3. Re: Infinite loop when checking character array length?

    id_num[size] should be '\0'
  4. Replies
    11
    Views
    999

    Re: [RESOLVED] Replace function [c]

    as for memory allocation, your best solution is probably this:

    perform a 'dry run' just to see how long the output string will be
    do a single allocation
    do another run, this time actually build...
  5. Replies
    6
    Views
    653

    Re: Random integers?!

    well, if we're going to give him the answer we may as well do it right


    #include <iostream.h>
    #include <stdlib.h> // rand(), srand()
    #include <time.h> // time()

    int main()
    {
    int i;
  6. Replies
    13
    Views
    732

    Re: Dialog Problems

    it's not as if the use of dialog templates is limited to MFC
  7. Replies
    5
    Views
    568

    Re: input validation

    how is input being assigned?
  8. Thread: Recursion

    by dis1411
    Replies
    6
    Views
    580

    Re: Recursion

    try

    #include <iostream.h>

    //using namespace std;

    int test(int x, int y)
    {
    cout << x << " " << y << endl;
  9. Replies
    5
    Views
    568

    Re: input validation

    you might consider using a switch statement.

    as for the code posted.. we're gonna need more info
  10. Thread: Recursion

    by dis1411
    Replies
    6
    Views
    580

    Re: Recursion

    the code as is should return 6... i suggest putting code to report the values of x and y at the top of the function
  11. Replies
    6
    Views
    3,000

    Re: Any hints to fool deassembling VB6.exe code?

    compiled vb6 code is pretty obfuscated
  12. Replies
    55
    Views
    8,983

    Re: C++ Is A Dying Language?

    VB .NET runs on C++. 'nuff said.

    edit: oh, C# also.
  13. Replies
    3
    Views
    467

    Re: Noob Question about Classes

    myclass
    {

    public:
    int myvar;

    };
  14. Thread: System Info

    by dis1411
    Replies
    4
    Views
    533

    Re: System Info

    you only need wmi for the cpu id.. the other things you mentioned can be found fairly easily.. a google search will yield many examples
  15. Replies
    3
    Views
    1,392

    Re: calculator game problem

    incidentally, i believe to store something in y you do y->whatever
  16. Replies
    2
    Views
    830

    Re: Calculator rounding off. URGENT

    int(x + 0.5) will do the trick
  17. Re: Any suggestions on a good database to use with C++ inventory-control program?

    include winsock before mysql
  18. Re: Any suggestions on a good database to use with C++ inventory-control program?

    i really wouldn't bother with mysql++

    go to mysql.org, grab the full installer. when installing, be sure to check that you want the source installed too. also grab the admin gui tools.

    setup...
  19. Replies
    5
    Views
    690

    Re: Going from vb and C# to C++?

    c# is a ways away from c++. there are several c# conventions that would be considered poor form in c++
  20. Re: How to terminate fetching a string from a database by using a NULL character?

    try
    char str[100] = {0};

    or better yet
    WriteFile(hFile,row[2],(DWORD)(strlen(row[2])),&wmWritten,NULL);
  21. Replies
    4
    Views
    475

    Re: Read/Parse File At The Same Time

    are there any memory allocations within a loop? might be a good place to start.

    also, you are paying a price for having the db be 'human readable' in its raw form. you may consider changing the...
  22. Replies
    1
    Views
    471

    Re: Problem with Combo box

    a screenshot would be helpful
  23. Replies
    8
    Views
    616

    your naming system

    let's hear what people use for declaration of datatypes / control handles etc

    eg

    nCount

    chkHeavy
  24. Replies
    2
    Views
    562

    Re: joining strings in MFC

    try _T("foo") for both
  25. Replies
    1
    Views
    743

    Re: VC++ : Group Box

    in the 'edit area' try clicking the text of the group box
  26. Replies
    8
    Views
    610

    Re: Win32 project in VS2005?

    you can use MFC as a static library and the exe won't need anything extra to run
  27. Replies
    6
    Views
    555

    Re: which is faster

    i would agree with penagate... however i am providing a simplified situation.. so ignore compiler omptimizations
  28. Replies
    6
    Views
    555

    which is faster

    bool func(int* i)
    {
    return (*i == 5);
    }

    bool func(const int& i)
    {
    return (i == 5);
    }
  29. Replies
    87
    Views
    3,496

    Re: VB6 on Windows Vista

    Hardware .. it just keeps getting Faster ....

    i suppose you were also shocked to see that doom 3 doesn't run well on a p2
  30. Replies
    87
    Views
    3,496

    Re: VB6 on Windows Vista

    the memory usage is misleading in vista... i until recently had 512 MB of ram and vista would quickly report using say 400-500 MB... however i could load and run apps with good speed.

    now, if...
  31. Re: Problem build VC6++ project in .Net 2003

    as long as the program works, what difference does it make to the customer?
  32. Replies
    17
    Views
    2,097

    Re: [RESOLVED] DVD iso to Multiple CDs

    Vista should eventually come out in CD version.. which IMO is much more hassle than the DVD

    also, I'd recommend installing it on a spare system until you're confident you can get all your...
  33. Replies
    5
    Views
    947

    Re: Who Wants to make a few bucks

    is this still open?
  34. Re: PLEASE help me i'll pay money order/ paypal anything

    throw me a pm detailing what is to be done
  35. Re: Battle ship game in C,such a challenge thing :D

    ver 1

    #include <iostream.h>

    #define WATER ' '
    #define WATER_SHOT 'x'
    #define SHIP 'O'
    #define SHIP_SHOT ''
    #define SIZE 10
  36. Re: Battle ship game in C,such a challenge thing :D

    this could basically get as tedious as you want it to be

    if you want a quick and dirty way.. you could do something like this..


    #define WATER ' '
    #define WATER_SHOT '-'
    #define SHIP 'O'...
  37. Replies
    5
    Views
    616

    Re: Dynamically sized string

    char *myString = "this is my string";

    myFunc(myString);

    void myFunc(char str)
    {
    char *head

    head = (char*)malloc(strlen(str)+6);
    head[strlen(str)+5] = '\0';
  38. Replies
    7
    Views
    676

    Re: Creating photoshop-like toolbars

    have you tried WM_KILLFOCUS?

    also, try using spy++ to get the style(s) of the of the toolbar
  39. Re: How to receive windows events from external app?

    yeah, only a .dll can do this. even in c++.
  40. Replies
    17
    Views
    922

    Re: Need help turning this into VB6 Code

    do you have paypal?
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width