Forum Replies Created

Viewing 15 posts - 31 through 45 (of 93 total)
  • Author
    Posts
  • in reply to: I also need help..! #3594
    GWILouisaxwzkla
    Participant

    could try:

    in reply to: Buffer overflow c/c++ #3587
    GWILouisaxwzkla
    Participant

    I haven’t used the software since I’ve gotten pretty good at finding access violations after years of writing my own data structures and lots of software that uses pointers. Anything I write in C/C++ or assembly language is designed with execution speed in mind so I probably would not use anything that slows my code down ( I belive that is why C/C++ was designed without provisions to check for access violations at compile time ). Anyway , I guess the software is a clever idea and if you don’t mind the performance hit , use it ………

    in reply to: Buffer overflow c/c++ #3585
    GWILouisaxwzkla
    Participant

    Interesting program ( I suppose this software is based on a parser that uses the C/C++ grammer that checks declarations and uses of pointers and arrays ). I guess its fine to use something like this ( if you trust the authors code :) ). You do have to run your source code through two translators per compile though , this could take extra time with large programs …..

    in reply to: Two things in an IF statement #3592
    GWILouisaxwzkla
    Participant

    could do something like this:

    in reply to: please help me with bubbleSort argument #3590
    GWILouisaxwzkla
    Participant

    Heres a bubble sort I wrote awhile ago ( hope this helps ):

    in reply to: Buffer overflow c/c++ #3583
    GWILouisaxwzkla
    Participant

    The best thing to do in c/c++ is check that the indexes are with in range :

    since c/c++ does not use array descriptors ( an array header with the maximum length information ) there is really no other way I can think of.

    in reply to: How to avoid if else… #3580
    GWILouisaxwzkla
    Participant

    This is really the only way to do this in C ( if your decision was based on constants I would suggest a “switch” statement ). You could could also use “goto”‘s and lables but this would be bad programming practice and the compiler will generate the same type of code at the assembly level anyway. You could also use “function pointers” in an array and make the variable ‘n’ index this array and then call the proper function , but this might be a waste of memory even thought you avoid testing a value for each “if” statement. I’d probably stick with the “if” chain ……..

    in reply to: Stack unwinding in native code #3413
    GWILouisaxwzkla
    Participant

    Heres a good tutorial on C++ exception handling : http://www.deitel.com/articles/cplusplus_tutorials/20060325/

    in reply to: Algorithms In C++ (Urgently needed) #3579
    GWILouisaxwzkla
    Participant

    first part:

    second part:

    bubble sort:

    selection sort:

    in reply to: Basic C Help — Currency Converter #3451
    GWILouisaxwzkla
    Participant

    could do something like this ( I’m not real good with stdio.h , In school I used iostream.h ) :

    in reply to: FILE HANDLING #3577
    GWILouisaxwzkla
    Participant

    could do in C++ ( C is similar ):

    in reply to: license validation #3563
    GWILouisaxwzkla
    Participant

    If you want to see if a date is less than another , I would do:

    in reply to: hi…. #3562
    GWILouisaxwzkla
    Participant

    If your original calculations are correct it should be fine. You’ll need to test the program thought…….

    in reply to: hi…. #3560
    GWILouisaxwzkla
    Participant

    yeah , that makes sence :) .

    in reply to: hi…. #3558
    GWILouisaxwzkla
    Participant

    oops. try this version with total as a double :

Viewing 15 posts - 31 through 45 (of 93 total)