Thread: All the possible permutations of 'n' strings. C= n!/(n-k)! Possibly with 'n' ≠ 'k'

  1. #16
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I think you need to do 2 things:

    1) Take your time in order to post code that works.
    2) Post C++ where it belongs; post C where it belongs.

    That's it.

  2. #17
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    Quote Originally Posted by whiteflags View Post
    1) Take your time in order to post code that works ... 2) Post C++ where it belongs; post C where it belongs.
    In this case, what I should have done in the first place.

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You should keep it within reason. A short snippet of demonstrating how to do something is a good thing. Even better is if you leave it as an exercise for the OP to actually use what you posted an integrate it him/herself into his/her code, ie something that demonstrates an idea but cannot be used directly as is.
    Giving complete snippets or long snippets of code is generally not a good idea.
    Complete snippets is similar to spoon feeding, that is, giving code away that the OP did not write. The OP learn less than doing it him/herself.
    Long snippets make the code more complex and makes it more difficult to get the point across to make the OP understand.

    I am also going to agree that if you post in the C++ section, you should stick to C++ code. After all, we are teaching C++ here, and not C. Obviously the same goes for the C section.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help needed with strings permutations program
    By anujit1601 in forum C Programming
    Replies: 6
    Last Post: 08-15-2012, 12:15 PM
  2. Permutations
    By bumfluff in forum C++ Programming
    Replies: 2
    Last Post: 10-05-2008, 12:33 PM
  3. Could someone possibly take a look at this?
    By Joe123 in forum C++ Programming
    Replies: 5
    Last Post: 03-01-2006, 09:39 PM
  4. Replies: 9
    Last Post: 01-21-2004, 04:53 AM

Tags for this Thread