Forum: C++ Jun 13th, 2007 |
| Replies: 10 Views: 1,359 I do apologize, I took what she said as unnecessarily harsh. I actually got offendid by it, I really was trying to understand. But if she didn't mean anything by that, then I would like to officially... |
Forum: C++ Jun 12th, 2007 |
| Replies: 10 Views: 1,359 Just don't become a teacher okay? And I wasn't looking for simpler, I was loking for more expanded. You can explain anything too simple so no one understands. You ask me what a book is and I tell you... |
Forum: C++ Jun 12th, 2007 |
| Replies: 10 Views: 1,359 I don't quite understand what you said to do there. Sorry |
Forum: C++ Jun 12th, 2007 |
| Replies: 10 Views: 1,359 Is there any way I can make the name a constant? I'm not sure how because I can't initialize it with something. |
Forum: C++ Jun 12th, 2007 |
| Replies: 10 Views: 1,359 In my program I have a loop with a variable that shows the players name, they choose something then it goes back to display their name and all it shows is arrows.... why? I'll post my code, run it... |
Forum: C++ Jun 12th, 2007 |
| Replies: 6 Views: 874 Is there a way I can do an actual array of arrays? Not a multidimensional one. That way I could have different sized arrays in it. Or how could I do a pointer to an array, then an array of those... |
Forum: C++ Jun 12th, 2007 |
| Replies: 6 Views: 874 I was wondering how I could access my several countryAttachedXX arrays(in this post they start on line 85), without many if statements, determined by user input. I was thinking maybe an array of... |
Forum: C++ Jun 11th, 2007 |
| Replies: 6 Views: 5,593 I'm sorry, I should have specified, I need to initialize it with numbers, but not all the numbers are the same, so I can't modify the "10 copies of 'a'" suggestion. Something like, initializing an... |
Forum: C++ Jun 11th, 2007 |
| Replies: 6 Views: 5,593 How do you initialize an STL list with the values when you declare it? That way I don't have to add the values later with a loop and push_back.
Thanks,
-Matt |
Forum: C++ Jun 11th, 2007 |
| Replies: 10 Views: 1,221 Wow, thank you, what a difference in code length.... |
Forum: C++ Jun 11th, 2007 |
| Replies: 10 Views: 1,221 I am trying to make a text version of risk, and I need to store the population, or army count, for each country. So the only way I could think to do that, as you'll see in my code, is by making a... |
Forum: C++ Jun 9th, 2007 |
| Replies: 1 Views: 579 Scratch that, I was going WAY over complicated, I revised the part where the countries are divided and it works now, just in case you're wondering, this is what I was trying to do:
/* ISU program... |
Forum: C++ Jun 9th, 2007 |
| Replies: 1 Views: 579 I'm having some trouble with STL lists. What I want to do in my program is take the players initial and put it into an array at the spot that they got from when I divided up 20 numbers (0-19). Can... |
Forum: C++ Jun 9th, 2007 |
| Replies: 5 Views: 2,063 Thanks people, I'm learning here. |
Forum: C++ Jun 9th, 2007 |
| Replies: 5 Views: 2,063 I'm wondering why it prints so many spaces when I only ask it to print one. Here's the code:
#include <iostream>
#include <string>
using namespace std;
string ar[21] = " ";... |
Forum: C++ Jun 9th, 2007 |
| Replies: 5 Views: 1,740 Thank you! I need to finish something impressive for my isu by mid next week, and although i won't be able to finish the game entirely, I will be able to show off some impressive coding. This was... |
Forum: C++ Jun 8th, 2007 |
| Replies: 5 Views: 1,740 actually the second thing is giving me no problems what so ever and works perfectly. I'm just wondering how do i access the individual classes in the vector once I put them in there. |
Forum: C++ Jun 8th, 2007 |
| Replies: 5 Views: 1,740 I had a thread going not too long ago, and from that I was able to make a global vector that I can store class objects in. But now when I try to access it, it says "no match for 'operator[]' in... |
Forum: C++ Jun 8th, 2007 |
| Replies: 16 Views: 28,243 Ok, I figured out it does work, but you need to get rid of the word "new" in front of humanPlayer. |
Forum: C++ Jun 8th, 2007 |
| Replies: 16 Views: 28,243 Also, I tried what was suggesed in that post and it didn't seem to work for me too well. |
Forum: C++ Jun 8th, 2007 |
| Replies: 16 Views: 28,243 Shouldn't this work? Why does it say no matching function?
/* ISU program created by Matt
in grade 12 programming. */
#include <iostream>
#include <list>
#include <iterator>
#include... |
Forum: C++ Jun 8th, 2007 |
| Replies: 16 Views: 28,243 Is there any way to use STL lists for this? Because then I wouldn't need to specify a size at the begining and could make it a global list. Because I'll probably have a coupel of these things in the... |
Forum: C++ Jun 7th, 2007 |
| Replies: 16 Views: 28,243 Ok, after reading these posts, I'm not sure what I should do for my code. Should I do what joe said to do with the reference? Or what s.o.s. was saying to do creating a new array and what not? |
Forum: C++ Jun 7th, 2007 |
| Replies: 16 Views: 28,243 But you don't find out what the numOfPlayers value is until getName() is started. |
Forum: C++ Jun 7th, 2007 |
| Replies: 16 Views: 28,243 I understand what oyu mean, but not how to really use it the way you mean to use it, how could I apply it to this code, I need to access the jailHouse array in main() and probably other functions to... |
Forum: C++ Jun 7th, 2007 |
| Replies: 16 Views: 28,243 How can I make a pointer to an array? So that I access the members of the array by using the pointer in a seperate function. I'm wondering because I have an array I have to access in functions other... |
Forum: C++ Jun 7th, 2007 |
| Replies: 1 Views: 1,481 I'm making a program where there is a function that asks how many players there are, and depending on the answer, it makes an array of classes that size. How can I access the array of classes from... |
Forum: C++ Jun 6th, 2007 |
| Replies: 1 Views: 700 Is there a way to make a loop that creates strings? I ask the user how many players there are, and then the loop makes that many strings in order to get all of their names... Something like this,... |
Forum: C++ Jun 6th, 2007 |
| Replies: 4 Views: 935 How would I go about using std::string things for what I need? |
Forum: C++ Jun 6th, 2007 |
| Replies: 4 Views: 935 Can anyone tell me why this doesn't work? I know it's probably really easy, but I did try.... /* ISU program created by Matt
in grade 12 programming. */
#include <iostream>
#include <list>... |
Forum: C++ Jun 6th, 2007 |
| Replies: 2 Views: 2,123 Thanks, that worked beautifully. |
Forum: C++ Jun 6th, 2007 |
| Replies: 2 Views: 2,123 When using an STL list, how can I check if a certain variable happens to just be in there? Basically, given this already:
#include <iostream>
#include <list>
#include <iterator>
using namespace... |
Forum: C++ Jun 5th, 2007 |
| Replies: 3 Views: 1,030 I need to set up 2 buttons to take input from the user, that increase and decrease a variable, it doesn't matter which 2 buttons are used, but preferably the up and down arrows. And I also need to... |
Forum: C++ Jun 4th, 2007 |
| Replies: 6 Views: 2,389 I tried that and it still said the same thing. But is any header with the .h a deprecated one? or just the iostream one? Because i tried it with the fstream one just now. And I'm using the latest... |
Forum: C++ Jun 4th, 2007 |
| Replies: 6 Views: 2,389 Thanks a lot, that helped and my program works now, although I don't understand what I should be using instead of the iostream.h i tried just iostream and it said cout was undefined... |
Forum: C++ Jun 4th, 2007 |
| Replies: 6 Views: 2,389 **I know the code looks big, but it's a very small isolated section at the bottom (starting at line 164) that's giving me the problem.**
When this program is run, when I try to open the file I... |
Forum: Python May 30th, 2007 |
| Replies: 3 Views: 1,686 i'm helping an admin of a network where the users put starcraft everwhere and anywhere, and rename the folders, and have it in more than one place at once. so i need it to run until its found... |
Forum: Python May 30th, 2007 |
| Replies: 3 Views: 1,686 ############################################################################
# #
# This program seeks out every copy of... |
Forum: Python May 29th, 2007 |
| Replies: 3 Views: 2,233 str1 = 'c:\documents and settings\user\desktop'
str2 = 'starcraft.exe'
print str1
I would like to know how it would be possible to add str2 to the end of str1 with a "\" inbetween the two... |
Forum: C++ May 25th, 2007 |
| Replies: 5 Views: 1,014 Yeah, I'm following a tutorial. And thanks for the help guys. |