Search:

Type: Posts; User: swgh

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. int main() Is another one too - the difference...

    int main()

    Is another one too - the difference is entirely compiler specific. For instance the LCC compiler will give a
    warning if the char* args version us used without explicitly giving the...
  2. Thread: Basic Questions

    by swgh
    Replies
    6
    Views
    707

    What could be wrong here?

    What could be wrong here?
  3. Replies
    9
    Views
    1,095

    OMG Two great community members - will be...

    OMG

    Two great community members - will be sadly missed. I remember them both fondly. Dave had an Avatar of a cat and I think he might of been a mod at one point. Adak was quite a seasoned poster...
  4. Main returns an integer. It's usually best to...

    Main returns an integer.
    It's usually best to explicitly assign variables a value before you use them to avoid any garbage values being calculated.
    Try not to use system call functions to pause the...
  5. Replies
    10
    Views
    1,740

    I used to have the "Dragon" probably one of the...

    I used to have the "Dragon" probably one of the oldest computers I owned back then. I've been through a fair few, here's my list:

    Binatone
    Dragon
    Spectrum Z86
    C64
    Amiga 500
    Amiga 500+
    Amga...
  6. Replies
    2
    Views
    1,024

    Not sure what you mean by "spoiling performance"?...

    Not sure what you mean by "spoiling performance"? Are you getting overflows or negative values, or is the random generation not 'random' enough?
  7. Replies
    1
    Views
    1,129

    Visual Studio 2017 RC

    Hey Guys!

    I installed Microsoft Visual Studio 2017 RC and it's the first RC version of VS I have ever had - I know a release candidate is not the "final" version of the software, but I am curious...
  8. Thread: code help

    by swgh
    Replies
    4
    Views
    614

    1. Main always returns int 2. Your FILE pointer...

    1. Main always returns int
    2. Your FILE pointer should be assigned NULL before it's used if not assigned at declaration
    3. It's also a good idea to assign the struct member "number" something also...
  9. Depends what the tattoo is of. Well, joking...

    Depends what the tattoo is of. Well, joking around it could be a nude woman for example that most people get on board with :D
  10. If you feel that could help people look for the...

    If you feel that could help people look for the possible error then yes that could be an idea, but it's your personal work and it's up to you to feel comfortable with what you decide or decide not to...
  11. Thread: For Loop in C

    by swgh
    Replies
    3
    Views
    829

    I'll give you some very general tips. Your...

    I'll give you some very general tips.

    Your going to need two loops, one outer loop and one inner loop. Both continuation conditions are going to have to either increment to ten or decrement to...
  12. There are generally two reasons for this type of...

    There are generally two reasons for this type of error.

    1. The function has not been defined (generally a prototype) before it's used.

    2. The other and more probable reason is the function name...
  13. Thread: Finding the error

    by swgh
    Replies
    6
    Views
    835

    Not that this is entirely related, but it's...

    Not that this is entirely related, but it's always a good idea to check the return value of scanf when it's used.
  14. Have you "included" the header file holding the...

    Have you "included" the header file holding the function prototype in the same files as main.c and file.c?
  15. A lot of people on here may have accounts on...

    A lot of people on here may have accounts on other forums too. I know for a fact Salem has/did have an account on Code Project.

    Sorry Salem ;)

    Also - there are a lot of newbie coders joining...
  16. Replies
    9
    Views
    770

    Do not ever use goto. Use a loop instead or some...

    Do not ever use goto. Use a loop instead or some other conditional statement to return to that point of the code.
    Do not use getch() it's non-standard and not globally supported on all platforms....
  17. True - colleges and some 'older' books do still...

    True - colleges and some 'older' books do still enforce people learning C++ to learn C style arrays before Vectors. However vectors are part of the STL and perhaps authors of those books or lecturers...
  18. Replies
    5
    Views
    1,048

    Thank you algorism. I really appreciate your...

    Thank you algorism. I really appreciate your input on the subject :).

    Oddly, I generally got the unused warning if for example if I declared but did not use a variable as you stated, just never...
  19. Replies
    5
    Views
    1,048

    Thanks Salem. I swapped the 'c' and 'v' around...

    Thanks Salem.

    I swapped the 'c' and 'v' around and will keep to that format from now on. I still do not understand why I am getting "unused" warnings about the parameters of the main function -...
  20. Replies
    5
    Views
    1,048

    LCC Compiler odd warning

    Hey guys!

    I recently updated code::blocks to the new version for my home laptop and I always compile using the LCC compiler.

    Before the upgrade - this:


    //....
    int main(int argv, char*...
  21. Thread: Programming Tips

    by swgh
    Replies
    27
    Views
    32,980

    Sticky: Ada's Extra Advice: :D Also pick a language...

    Ada's Extra Advice: :D

    Also pick a language that you feel comfortable with. Don't go by the Tiobe Index etc - if your brand new and C/C++ scares you (it shouldn't really as both are good first...
  22. Replies
    4
    Views
    4,165

    The C standard guarantees that any object pointer...

    The C standard guarantees that any object pointer type can be converted to void* and back again without loss of information (meaning that the re-converted pointer will compare equal to the original...
  23. Replies
    5
    Views
    868

    >while(!feof(file)) { Does not read the entire...

    >while(!feof(file)) {

    Does not read the entire file correctly. Use


    while (fgets(<string name> sizeof(<string>) fptr) != NULL)
  24. Replies
    6
    Views
    872

    Poll: Looks pretty good. Clean and concise code with...

    Looks pretty good. Clean and concise code with good indentation and current standard function calls. One very slight thing, the way you declare your functions seem a little strange:


    void...
  25. What have you tried so far? Post some code with...

    What have you tried so far? Post some code with some questions or problems. If you understand the basic premise of recursion this isn't too hard.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4