• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

dpatel304

Member
My 16 year old cousin has an interest in programming. She took a web mastering class a few years ago and loved it and understood it well. She hasn't really done anything outside of the class, but she's having trouble deciding what she wants to do in college. It's a good major to have and, more importantly, she seems to love doing it. I just wanted to get her doing some stuff on the side and seeing if she likes it. Anything you guys can recommend for me?

When I was a kid, we used this program in school called Microworlds, or something. I didn't realize it at the time, but we were learning how to code. I can't remember it, but there was another flash game I had played a few years ago. It was basically a puzzle game where you control a robot through some mazes with obstacles. You don't control the robot in real time, though. You basically use very basic, dumbed down code to move him around.
 

usea

Member
My 16 year old cousin has an interest in programming. She took a web mastering class a few years ago and loved it and understood it well. She hasn't really done anything outside of the class, but she's having trouble deciding what she wants to do in college. It's a good major to have and, more importantly, she seems to love doing it. I just wanted to get her doing some stuff on the side and seeing if she likes it. Anything you guys can recommend for me?

When I was a kid, we used this program in school called Microworlds, or something. I didn't realize it at the time, but we were learning how to code. I can't remember it, but there was another flash game I had played a few years ago. It was basically a puzzle game where you control a robot through some mazes with obstacles. You don't control the robot in real time, though. You basically use very basic, dumbed down code to move him around.
There is Light Bot
Light Bot 2.0
and there's also Manufactoria which probably isn't what you meant, but it's pretty cool.
 
My 16 year old cousin has an interest in programming. She took a web mastering class a few years ago and loved it and understood it well. She hasn't really done anything outside of the class, but she's having trouble deciding what she wants to do in college. It's a good major to have and, more importantly, she seems to love doing it. I just wanted to get her doing some stuff on the side and seeing if she likes it. Anything you guys can recommend for me?

There's always Alice, lol :p
 

wolfmat

Confirmed Asshole
My 16 year old cousin has an interest in programming. She took a web mastering class a few years ago and loved it and understood it well. She hasn't really done anything outside of the class, but she's having trouble deciding what she wants to do in college. It's a good major to have and, more importantly, she seems to love doing it. I just wanted to get her doing some stuff on the side and seeing if she likes it. Anything you guys can recommend for me?

When I was a kid, we used this program in school called Microworlds, or something. I didn't realize it at the time, but we were learning how to code. I can't remember it, but there was another flash game I had played a few years ago. It was basically a puzzle game where you control a robot through some mazes with obstacles. You don't control the robot in real time, though. You basically use very basic, dumbed down code to move him around.
She should learn a programming language. Simple as that. Web stuff (Html+CSS+Javascript). Or Python.

16 is a great age for getting into it.
 

Osiris

I permanently banned my 6 year old daughter from using the PS4 for mistakenly sending grief reports as it's too hard to watch or talk to her
I have to say, Pluralsight has made jumping into Java from C/C# awesomely quick, great videos for intermediate programmers to get up and running with a new language very quickly, well worth a months subs.

The only thing that keeps catching me out is the 'for each' syntax, I keep damn typing it in c# style, doh!.

Oh and the '== vs .equals' issue with Objects, I'm gonna need a post-it note warning with these two items on my monitor for a while yet I think haha :D

Still got a long way to go though yet, the course/exam I'm going to be taking requires writing code with pen and paper, no IDE/Compiler handholding, and that takes a whole different level of comfortability.
 

squidyj

Member
So, I'm just starting on x86 and while the logic of everything that's going on and how things work is pretty clear the list of operations and interrupts of various stripes available to me are not, at least not yet.

I printed off a reference sheet from http://www.jegerlehner.ch/intel/.

Are there any other references anyone here would recommend?

Edit: Ideally something on DOS Interrupts that I'd be able to print off and carry with me.

particularly under 21h
 
There's always Alice, lol :p

So, true story. I was originally taking a Bachelor of Computer Information Systems. It was the first time my particular Uni had run this course. Our entire first programming course revolved around Alice. Oh ya, an entire bloody course where we programmed like children.

It was also the impetus for the best decision I've ever made. I switched to Computer Science after that year because I was tired of how slow they were going and I didn't want to waste 3 more years being their guinea pig for their new degree while not learning anything. 3rd year now. Getting crushed and loving it. I'll probably be up till 5 am for the next 2 nights on programming projects.

4 3rd year computer science courses at the same time, all while having to spend 2.5 hours in transit everyday and work 20 hours a week. Bad friggin idea. Computer Graphics, Data Structures 2, Operating Systems and Analysis of Algorithms.
 

squidyj

Member
So, true story. I was originally taking a Bachelor of Computer Information Systems. It was the first time my particular Uni had run this course. Our entire first programming course revolved around Alice. Oh ya, an entire bloody course where we programmed like children.

It was also the impetus for the best decision I've ever made. I switched to Computer Science after that year because I was tired of how slow they were going and I didn't want to waste 3 more years being their guinea pig for their new degree and not learn anything. 3rd year now. Getting crushed and loving it. I'll probably be up till 5 am for the next 2 nights on programming projects.

4 3rd year computer science courses at the same time, all while having to spend 2.5 hours in transit everyday and work 20 hours a week. Bad friggin idea. Computer Graphics, Data Structures 2, Operating Systems and Analysis of Algorithms.

cheers to graphics and Algorithms although mine is called Algorithm analysis and design.
 
I have to say, Pluralsight has made jumping into Java from C/C# awesomely quick, great videos for intermediate programmers to get up and running with a new language very quickly, well worth a months subs.

The only thing that keeps catching me out is the 'for each' syntax, I keep damn typing it in c# style, doh!.

Oh and the '== vs .equals' issue with Objects, I'm gonna need a post-it note warning with these two items on my monitor for a while yet I think haha :D

Still got a long way to go though yet, the course/exam I'm going to be taking requires writing code with pen and paper, no IDE/Compiler handholding, and that takes a whole different level of comfortability.
If you're in school, you should see if it has a Dreamspark subscription. I signed up and all I had to do was give my school email and respond from it and bam, free PluralSight subscription for either 30 or 90 days, not to mention free Windows 7 pro, free Visual Studio 2010 Ultimate(lol, this one made me laugh. $10,000 retail price), free Visual Studio 2012, free Windows 2008 Server R2 etc etc. Lots and lots of good software. If I'm not mistaken it also had Server 2012 as well.

Also, get DownloadHelper for Firefox and you can download PluralSight videos without needing their premium subscription. You just have to force Firefox to open popups in a new tab and then you'll still have access to DownloadHelper, otherwise you don't because it launches a new popup that's formatted to not allow that. I downloaded the C# course and a few other courses. I'll get to their videos when I have time, and I'm not paying for a subscription to do that. (I mean I have one, but it might run out by the time I have time to do anything)
 

Andrew54

Neo Member
I'm subscribing to this thread lol. I'm changing my major from biology to something with computers and writing code. I have no ideas what the names of the actual majors are yet. I'll probably ask for advice every once in a while here next semester, and any I receive will be greatly appreciated. Also, screw biology.
 
In C ,how would you call a function with the following parameters.



int count_chars (const char*string, char ch);

Code:
{
.
.
.
    count_chars([string], [ch])
.
.
}

where [string] and [ch] are your string and character values you want to pass.

for instance:

Code:
void passchar(char* string);
int main(void)
{
    char str [ ] = "Hello World";
    passchar(str);
    return 0;
}
void passchar(char* string)
{
//code goes here
}
 

r1chard

Member
spent the past 2 days at work tracking down a pointer bug. I love C
One of a few reasons why I've been a professional Python programmer almost exclusively for over a decade. Occasionally C creeps in, but I'm so incredibly careful with it... not that it helps of course, there's always a pointer bug ;-)
 

KingKong

Member
spent the past 2 days at work tracking down a pointer bug. I love C

I spent like a week trying to find an error in a C image renderer.... Turns out I was comparing two ints before I initialized one of them. Thanks for not giving me any error messages and not crashing C <3
 

Complex Shadow

Cudi Lame™
Anyone know any good free java text editor/compiler. I used j creator for a bit. But the it expired. I want something that will compile random files when I ask it.

Edit. I see net beans after reading the OP. I'll try it out tomorrow.
 

Lindbergh

Member
Fixing it is like finding hay in a stack of needles :(

Yup. I'm still haunted by dealing with referencing a struct's array values as it mysteriously changed when operated upon by a function within another block. I think I was creeping on strange memory behaviors in C.
 
If you're in school, you should see if it has a Dreamspark subscription. I signed up and all I had to do was give my school email and respond from it and bam, free PluralSight subscription for either 30 or 90 days, not to mention free Windows 7 pro, free Visual Studio 2010 Ultimate(lol, this one made me laugh. $10,000 retail price), free Visual Studio 2012, free Windows 2008 Server R2 etc etc. Lots and lots of good software. If I'm not mistaken it also had Server 2012 as well.

Also, get DownloadHelper for Firefox and you can download PluralSight videos without needing their premium subscription. You just have to force Firefox to open popups in a new tab and then you'll still have access to DownloadHelper, otherwise you don't because it launches a new popup that's formatted to not allow that. I downloaded the C# course and a few other courses. I'll get to their videos when I have time, and I'm not paying for a subscription to do that. (I mean I have one, but it might run out by the time I have time to do anything)

Could you expand more on this?

I have Dreamspark Premium and I'm unsure about how to get into PluralSight.

Thanks!
 

tuffy

Member
I spent like a week trying to find an error in a C image renderer.... Turns out I was comparing two ints before I initialized one of them. Thanks for not giving me any error messages and not crashing C <3
I recommend Valgrind for problems like this. With its memory checker wrapped around your program, you'll get error messages like "Conditional jump or move depends on uninitialised value(s)" and can work to narrow down the cause. And it'll also keep track of any memory leaks your program might be generating in the process.

It's a huge time saver.
 
Wow thank you!

Apparently I had some kind of basic Dreamspark through the university that just gave me Windows 8, 7, the Visual Studio's and such but now I'm signed up and good to go!
 

roddur

Member
Quoting my prev. post
i know this thread is about c/c++ but i've a question about .net.

i want to set diff. font color to to diff. items in a combobox when the program loads. any idea how to do that. i'm using framework 1.1

I've solved the coloring issue using Drawitem method. but now the problem is with selection color. by default the highlighted combo item shows a blue bg a white font(default font color is black).

but after using Drawitem i'm trying to get that effect, but failing.

any ideas?
 

Harpuia

Member
Goddamn it, sooper baby beginner here at all things computer. But I know HTML isn't exactly a programming language, but ARGH this has been annoying me to no end!!! OK, so basically, here's my code:

Code:
<html>

<body>

<h1><img src="http://toons.artie.com/alphabet/numbers/arg-3-50-trans.gif" alt="3" width="182" length="176"> 
Questions. </h1>

<table border="8" align="center">

<tr>
<th style="font-family: helvetica;">
Questions
</th>
<th style="font-family: helvetica;">
Answers
</th>
</tr>


<hr><h2><img src="http://toons.artie.com/alphabet/numbers/arg-4-50-trans.gif" alt="4">

<table border="8" align="center">

<tr>
<th style="font-family: helvetica;">
Questions
</th>
<th style="font-family: helvetica;">
Answers
</th>
</tr>

</body>

</html>

OK, you see how it's basically in the format "image, table, image, table"? I would love for it to keep that way, but no matter what I've tried, I can't figure out a way to make the images stay above their respective tables! Is there a way to do this?
 

Haly

One day I realized that sadness is just another word for not enough coffee.
You could always just throw the images into a table cell above all your textual content.

That or put both the images and tables in their own divs.

EDIT: Why are there header tags around your image?

EDIT 2: You forgot to close your <table> tags, that's the problem. You also have an open <h2> tag.
 

Harpuia

Member
You could always just throw the images into a table cell above all your textual content.

That or put both the images and tables in their own divs.

Divs, I knew they were the solution. I tried to use them, but I suppose I got the formatting incorrectly...I'll try again and see if this yields a solution.

EDIT: Oops, they were meant to be there, because I wanted the image in between two words. I just rewrote the code for this quick example.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
I updated my post after testing the code on my comp.
 

Chris R

Member
You could always just throw the images into a table cell above all your textual content.

That or put both the images and tables in their own divs.

EDIT: Why are there header tags around your image?

EDIT 2: You forgot to close your <table> tags, that's the problem. You also have an open <h2> tag.

Those are the biggies I can see with a quick 10 second glance.

Code:
<html>
    <body>
        <h1>
            <img src="http://toons.artie.com/alphabet/numbers/arg-3-50-trans.gif" alt="3" width="182" length="176"> 
            Questions.
        </h1>
        <table border="8" align="center">
            <tr>
                <th style="font-family: helvetica;">
                    Questions
                </th>
                <th style="font-family: helvetica;">
                    Answers
                </th>
            </tr>
        
        <hr>
        <h2>
            <img src="http://toons.artie.com/alphabet/numbers/arg-4-50-trans.gif" alt="4">

        <table border="8" align="center">
            <tr>
                <th style="font-family: helvetica;">
                    Questions
                </th>
                <th style="font-family: helvetica;">
                    Answers
                </th>
            </tr>
    
    </body>
</html>

Yep, missing a bunch of closing tags (on the hr and img as well, CLOSE ALL YOUR TAGS!!!) Pretty easy to see when you properly indent your code.

Also, why not just style the font-family on your body tag (or better yet, create a CSS class and assign that to your body instead)? If you have any more questions ask away! I'm here all night and more than willing to help.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Proper indenting and a decent text editor (notepad++ for example) are a must. Makes it much easier to notice unclosed tags. The first thing I did when I copied your code was to indent everything.
Code:
<html>
    <body>

        <h1>Questions.</h1>
		
        <img src="http://toons.artie.com/alphabet/numbers/arg-3-50-trans.gif" alt="3" width="182" length="176">

        <table border="8" align="center">
            <tr>
                <th style="font-family: helvetica;">
                    Questions
                </th>
                <th style="font-family: helvetica;">
                    Answers
                </th>
            </tr>
        </table>

        <img src="http://toons.artie.com/alphabet/numbers/arg-4-50-trans.gif" alt="4">

        <table border="8" align="center">
            <tr>
                <th style="font-family: helvetica;">
                    Questions
                </th>
                <th style="font-family: helvetica;">
                    Answers
                </th>
            </tr>
        </table>

    </body>
</html>
 

Exuro

Member
Okay so I'm trying to learn how to use classes and I don't know why my setSuit/Rank functions aren't working. I'm trying to make a simple deck of cards using a vector and 2 classes and I want to have a few functions to manipulate it.

It's broken up into 4 files so I can see everything easily. The problem is in the card file where I'm trying to make two functions that set the suit and rank of the card. For some reason it's not working as I intended it to. Can anyone take a quick look? Large block of text, but the issue is in the card.h file. Thanks.


Code:
#ifndef __HEAD_H_INCLUDED__
#define __HEAD_H_INCLUDED__

#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <string>
using namespace std;

#endif // __HEAD_H_INCLUDED__

Code:
#ifndef __CARD_H_INCLUDED__
#define __CARD_H_INCLUDED__

class Card {
  public:
    Card(int s, int r)
    : suit(s), rank(r)  {
      // Initialize anything else here
    }
	string getName();
    int getSuit();
	int getRank();
	void setSuit(int);
	void setRank(int);
  private:
    int suit, rank;
};

int Card::getSuit()
{
	return suit;
}

int Card::getRank()
{
	return rank;
}

void Card::setSuit(int s)
{
	cout << "sInput is: " << s << endl;
	cout << "Suit Bis: " << suit << endl;
	suit = s;
	cout << "Suit Ais: " << suit << endl;
}

void Card::setRank(int r)
{
	cout << "rInput is: " << r << endl;
	cout << "Rank Bis: " << rank << endl;
	rank = r;
	cout << "Rank Ais: " << rank << endl;
}

string Card::getName()
{
 return "Banana";
}


#endif  // __CARD_H_INCLUDED__

Code:
#ifndef __DECK_H_INCLUDED__
#define __DECK_H_INCLUDED__

class Deck {
  public:
    Deck();
    Card getCard(int a);
	void shuffle();
  private:
    vector <Card> cards;
};

Deck::Deck() {
  for (int suit = 0; suit < 4; suit++) {
    for (int rank = 0; rank < 13; rank++) {
      cards.push_back(Card(suit, rank));
    }
  }
}

Card Deck::getCard(int a)
{
	return cards[a];
}

void Deck::shuffle()
{
	std::random_shuffle(cards.begin(), cards.end());
}

#endif // __DECK_H_INCLUDED__

Code:
#include "head.h"
#include "card.h"
#include "deck.h"

int main()
{
int input = 0;
int rank = 0;
int suit = 0;
Deck deck;
while (input != 52)
{
	cout << "Enter a Number: ";
	cin >> input;

	if (input == 66)
		deck.shuffle();
	if (input == 77)
	{
		cout << "Enter Input: ";
		cin >> input;
		cout << "Enter Suit: ";
		cin >> suit;
		cout << "Enter Rank: ";
		cin >> rank;
		deck.getCard(input).setRank(rank);
		deck.getCard(input).setSuit(suit);
	}

	cout << endl << "Your suit is "<< deck.getCard(input).getSuit() << " and your rank is " << deck.getCard(input).getRank() << ".\n";
}
}
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Alright, found your problem. I don't think I can explain this very well or accurately but here's where it's not working. When you return a Card object from Deck.getCard(int), you're not actually returning the Card object inside the Deck, but a copy of it. So, when you call setSuit()/setRank(), it looks like it's working but the Card objects inside the Deck object stay the same.

You need to return an address to the Card objects inside Deck in order to modify them rather than a copy. Alternatively, you can turn vector <Card> cards into an array of Card*, like vector <Card*> cards, which is what I was taught to do.
 

Exuro

Member
You need to return an address to the Card objects inside Deck in order to modify them rather than a copy. Alternatively, you can turn vector <Card> cards into an array of Card*, like vector <Card*> cards, which is what I was taught to do.
Thank you very much. It was really annoying me when I went to sleep last night. I'll try this out when I get back from school.

So when I use my functions I'm just getting a copy of the values right? This kind of confuses me as the shuffle function is working properly. Other than making the vector a pointer, is there anything that looks sloppy or improperly made that I should change? I'd like to get a solid foundation on these classes. Thanks again.
 

Slavik81

Member
Alright, found your problem. I don't think I can explain this very well or accurately but here's where it's not working. When you return a Card object from Deck.getCard(int), you're not actually returning the Card object inside the Deck, but a copy of it. So, when you call setSuit()/setRank(), it looks like it's working but the Card objects inside the Deck object stay the same.

You need to return an address to the Card objects inside Deck in order to modify them rather than a copy. Alternatively, you can turn vector <Card> cards into an array of Card*, like vector <Card*> cards, which is what I was taught to do.
That's definitely the problem. Through he could change the return value of that function to a reference (Card&) and he wouldn't have to change anything else.
 

Exuro

Member
Alternatively, you can turn vector <Card> cards into an array of Card*, like vector <Card*> cards, which is what I was taught to do.
Okay this is getting into a bit of unknown territory for me. Would this just point to the address of all of the variables class has? And what else would I need to change? I set the vector to be type Card* and am looking at a compile error saying theres no matching function call to push_back in the deck constructor.
 

dabig2

Member
Okay this is getting into a bit of unknown territory for me. Would this just point to the address of all of the variables class has? And what else would I need to change? I set the vector to be type Card* and am looking at a compile error saying theres no matching function call to push_back in the deck constructor.

If you're using a vector of Card pointers, then when you do your push_back operation, you have to insert into that function call a Card pointer. That might be where the error is happening. Try something like this:

Code:
Deck::Deck() {
  for (int suit = 0; suit < 4; suit++) {
    for (int rank = 0; rank < 13; rank++) {
       [B]Card * cardPtr = new Card(suit, rank); //instantiate a Card pointer object on heap
      cards.push_back(cardPtr);//and then add it to the vector[/B]
    }
  }
}

Of course, make sure to call the Card class's destructor when you're done with the card less you end up with a lot of garbage Card pointers floating around in the program. Could get messy.
 

Exuro

Member
If you're using a vector of Card pointers, then when you do your push_back operation, you have to insert into that function call a Card pointer. That might be where the error is happening. Try something like this:

Code:
Deck::Deck() {
  for (int suit = 0; suit < 4; suit++) {
    for (int rank = 0; rank < 13; rank++) {
       [B]Card * cardPtr = new Card(suit, rank); //instantiate a Card pointer object on heap
      cards.push_back(cardPtr);//and then add it to the vector[/B]
    }
  }
}

Of course, make sure to call the Card class's destructor when you're done with the card less you end up with a lot of garbage Card pointers floating around in the program. Could get messy.
Sorry I'm still kind of confused. I took two classes in C and C++ over a year ago so I'm trying to get back into the swing of things.

Just to be clear, this method would create a pointer that points to each element and assigns the element whatever suit/rank right? How would this let me change the private members in the cards with my setsuit()/setrank() functions?

Maybe I need to take a step back and go over vectors/classes separately. And pointers too. >_>
 

dabig2

Member
Sorry I'm still kind of confused. I took two classes in C and C++ over a year ago so I'm trying to get back into the swing of things.

Just to be clear, this method would create a pointer that points to each element and assigns the element whatever suit/rank right? How would this let me change the private members in the cards with my setsuit()/setrank() functions?

Maybe I need to take a step back and go over vectors/classes separately. And pointers too. >_>

Hah, I know that feel. Haven't actually touched C/C++ in probably 2 years.

But yeah, the redesigned constructor of your Deck class that I showed - instead of just creating a Card object on the stack and putting it into your vector - it now instantiates a Card object on the heap and stores the pointer to that Card object into your vector.

So I'm guessing you're still cloudy about what happens in these two calls with a Card pointer?
Code:
deck.getCard(input).setRank(rank);
deck.getCard(input).setSuit(suit);

Here's a really dumb analogy that I apologize for (slightly drunk so bear with me): In your original program, Deck really doesn't trust main(). He has a safe full of diamonds he created, but main() is asking him to reach into that safe and give him a legit diamond to screw around with. Deck doesn't want that, so he gives him a copy of a diamond to play around with.

If you have a vector of pointers though, Deck's misgivings don't matter. Because his safe is now full of keys to a bigger safe out there that is accessible equally by both Deck and main() (called the heap). Main(), with the key passed from Deck, can just go directly to that bigger safe with his key and screw up the diamonds all he wants.

But one thing changes in your coding. Since you now have a pointer, you'll be accessing the private functions of the Card class slightly differently. Or, to continue the analogy, you need to actually put the key in the safe and turn it to get at the goodies inside.

Code:
deck.getCard(input)[B] -> [/B]setRank(rank);
deck.getCard(input)[B] -> [/B]setSuit(suit);

When you're dealing with a pointer to an object instead of the object itself, you can of course still access its private functions and do whatever you want to it as if it were just a regular, old, boring object. It's just that now you have to dereference that pointer and that's what that arrow does. You can call it another way as well, but I like the arrow pointer for its elegance.

Hope that helps a little.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Can't trust that shady character, main().
 

Exuro

Member
Hope that helps a little.
First of all, that analogy was awesome. You should teach or something if you dont already. Hopefully you can still bare with me. I get a better grasp on that idea itself and am learning a few new vocab words. So, I'm accessing my vector through pointers, which means I can manipulate the actual variable instead of accessing a copy of it correct? And because I'm making the card vector a set of pointers do I need to change the getCard() to a pointer as well?

Code:
Card Deck::getCard(int a)
{
	return *cards[a];
}

Not doing that causes an error. Also the dereferences are getting errors as well, saying "base operand of '->' has non-pointer type 'Deck' ". :(
 

Haly

One day I realized that sadness is just another word for not enough coffee.
You'd have to change it to:
Code:
Card* Deck::getCard(int a)
{
	return cards[a];
}
Because you're returning a Card* pointer and not a Card object.
 

Exuro

Member
You'd have to change it to:
Code:
Card* Deck::getCard(int a)
{
	return cards[a];
}
Because you're returning a Card* pointer and not a Card object.
Oh snap that makes sense. And after dereferencing getsuit/rank/name it's working! Feels like wizardry! Makes me feel a lot better. Now I need to have a destructor at the end of the program so the pointers get removed or whatnot right?

Made a get(Suit/Rank)Name(int) that takes the value of rank and suit and appends the name into a string saying "Ace of Hearts" for example. Trying to think of things you do with a deck of cards. Getting over that hurdle has really helped.

Alright, new question. What would I do if I wanted to pass the cards vector elements into a stack? cards[a] is an address so what would I do to get a copy of its values as well as its rank/suits?
 
Top Bottom