Forum Replies Created

Viewing 15 posts - 16 through 30 (of 93 total)
  • Author
    Posts
  • in reply to: beginners needs help #3619
    GWILouisaxwzkla
    Participant

    Don’t know what type of sort you need to use but heres one with bubble sort:

    in reply to: beginners needs help #3616
    GWILouisaxwzkla
    Participant

    could try:

    in reply to: WhiteSpaces and Blank Lines #3615
    GWILouisaxwzkla
    Participant

    I’m not sure what compiler your using but the include file ctype.h has a macro called isspace() that can be called on characters , like:

    The definition is listed as

    The isspace() function returns non-zero if its argument is some sort of space (i.e. single space, tab, vertical tab, form feed, carriage return, or newline). Otherwise, zero is returned.

    from http://www.cppreference.com/wiki/c/string/isspace

    in reply to: Library Question #3613
    GWILouisaxwzkla
    Participant

    You pretty much got the idea about library functions. Most C/C++ compilers have a folder named “include” that has a number of “header” files that can be added to a project by using the preprocessor directive “#include” and then the header file in angle brackets ( like #include < iostream.h> ). There are a whole group of standardized header files each with a certain type of pre-built functions. stdio.h ( stands for standard input output ) , for example , has certain functions for input and outputing things to the screen and files. When you include a certaing “header file” you import all the functions in the file to your project , so this can add to your projects size. However , C/C++ is low level enough that you can write many of these functions your self instead of including them , or since many C/C++ have inline assembly language capabilties you can write your own custom set of utilities , if you desire. Many compilers come with executables that allow the user to compile and create their own header files as well. You’ll find C++ to be much more powerful than VB ……..

    in reply to: need help in adding a charecter to the file name #3609
    GWILouisaxwzkla
    Participant

    could just do this:

    GWILouisaxwzkla
    Participant

    Heres some code that does what you want ( maybe you can splice this into your program ):

    in reply to: please help me in finding out the bug in this program #3604
    GWILouisaxwzkla
    Participant

    heres an infix to postfix program I have laying around:

    in reply to: Need desprate help. . . #3605
    GWILouisaxwzkla
    Participant

    Heres a linked list program I had laying around:

    heres another one:

    in reply to: Help Please #3602
    GWILouisaxwzkla
    Participant

    could try:

    output:

    in reply to: Reading first column in a file and creating new files… #3601
    GWILouisaxwzkla
    Participant

    This seems to work:

    in reply to: convert decimal to binary #3600
    GWILouisaxwzkla
    Participant

    could try this:

    GWILouisaxwzkla
    Participant

    What type of sort are you using ? I would just sort , count unique instances , allocate enough memory to hold the unique instances and copy the data ……

    in reply to: How to redo the same code using structs #3598
    GWILouisaxwzkla
    Participant

    A little correction. It seems you are passing arrays of names , id’s and crn into the function:

    so you would change your prototype to :

    and access the data members like this:

    my bad ………

    in reply to: How to redo the same code using structs #3596
    GWILouisaxwzkla
    Participant

    You really just need to group all your data together ( structs are handy for this purpose ). So if you have a function prototype like:

    change it to:

    when you need to access a member of the struct , just use the dot operator and use the data as usual:

    not too much to the conversion …….

    in reply to: waah! #3595
    GWILouisaxwzkla
    Participant

    Heres the basic program that creates a deck and draws a hand ( not sure what you need to do as far as identifing the type of hand ?? You need the program to tell if the hand falls in one of the catagories : ( high card, pair, three of a kind, full house, straight, flush, four of a kind, straight flush, and royal flush.” ) ?? . Anyway heres the code ( not very complicated just tedious to write ) :

Viewing 15 posts - 16 through 30 (of 93 total)