I am new to c++ and I need help on what i did wrong with this code. I was trying to create a deck and print it and shuffle it and then print it again but i can't see what i did wrong. Please help.
Your iDeck is a 4x52 array. Unless you mean it to be 4 decks of cards, it should only be a single array of 52 cards (or, as eker said, a vector).
Your initDeck call doesn't actually set anything in iDeck. Your for(i = 0... is using an incorrect range. You only have 13 elements in rank, not 52.
Neither of your function declarations matchs your function definitions.
You should seed srand() before using rand().
Your shuffleDeck function isn't going to work. When you declare an array of 52 elements, it has 52 elements. The first element is 0, the last element is 51. IF you want to use element zero as your temporary card for shuffling, you need to declare an array of 53 elements total. You also have to change all your for loops. You're better off using a local temp variable though (or again, as eker said, vector).
Your printf line looks like you tried morphing it into a cout call. Printf isn't Polymorphic though. :-P