Search found 54 matches

Return to advanced search

Re: C++ Array Help?

:oops: What a silly mistake, I really should have realized that... Ran it, works perfectly! I see what you mean about this-> That seems like a good idea to distinguish variables, I just did it and it makes the code much more readable than I thought it would! Plus it'll keep me close to Python's s...
by the0nlyb0ss
on Wed Jan 05, 2011 8:24 pm
 
Forum: C and C++
Topic: C++ Array Help?
Comments: 10
Views: 3148

Re: C++ Array Help?

If you want the binaries with all of the data, it's here: http://dl.dropbox.com/u/3701354/TicTacToe%20Binaries.zip After running the program, check the bottom of the ErrorLog.log file for an outline of the array and its positions. Your code seems to have an issue with linking on my c...
by the0nlyb0ss
on Wed Jan 05, 2011 7:32 pm
 
Forum: C and C++
Topic: C++ Array Help?
Comments: 10
Views: 3148

Re: C++ Array Help?

What it does is fill a collection, in this case a simple array of int. Really interesting! Sort of just like a for loop to fill the array, but it can be used for any container? Sorry the code is pretty messy and not very well documented! The main functions/methods that have to do with the board arr...
by the0nlyb0ss
on Wed Jan 05, 2011 1:03 am
 
Forum: C and C++
Topic: C++ Array Help?
Comments: 10
Views: 3148

Re: C++ Array Help?

Thanks for the quick reply :) I tried your example, and you're right, it does do what I originally intended to do! If you'd like to check all of my code out it's here: (only about 350 lines of total code :P) http://dl.dropbox.com/u/3701354/TicTacToe.zip I just don't know if I'm passi...
by the0nlyb0ss
on Tue Jan 04, 2011 7:02 pm
 
Forum: C and C++
Topic: C++ Array Help?
Comments: 10
Views: 3148

C++ Array Help?

Hey guys, haven't been on in a bit. I'm trying to make a game of Tic-Tac-Toe using SDL and C++, and I'm using an array to store the "board". It's a nine-slot array, a 0 means unoccupied, 1 means user-occupied, and 2 means AI-occupied. The problem is that the array doesn't get modified corr...
by the0nlyb0ss
on Tue Jan 04, 2011 1:15 am
 
Forum: C and C++
Topic: C++ Array Help?
Comments: 10
Views: 3148

Re: Adopt a noob program

To me, from a noob standpoint, it would be useful to have a mentor so he can "show me the way" at times. Because sometimes, I progress and progress, then I think to myself, "Now what? What next?" There's such a vast amount of paths you could take that it becomes really confusing ...
by the0nlyb0ss
on Wed Oct 13, 2010 12:48 am
 
Forum: Comments & Suggestions
Topic: Adopt a noob program
Comments: 28
Views: 7478

Re: Help with command line arguments?

Thank you guys! This just goes to show how little (none?) I know about C++, i decided to just make it do the standard "dir" without any options :P
Now I'm going to start seriously learning C++ and maybe somewhere along the road I'll look back on this and say "Doh!" :)
by the0nlyb0ss
on Thu Oct 07, 2010 10:08 pm
 
Forum: C and C++
Topic: Help with command line arguments?
Comments: 5
Views: 1330

Re: Help with command line arguments?

No, no arguments work at all. No matter what I put whether it be "-h", "-v", "-l", "-a", or "-la" :cry:
I'll edit the OP to say that to avoid confusion
by the0nlyb0ss
on Sun Oct 03, 2010 9:14 pm
 
Forum: C and C++
Topic: Help with command line arguments?
Comments: 5
Views: 1330

Help with command line arguments?

I tried writing a replacement for "dir" because I'm so accustomed to using "ls". I wrote it successfully in Python, but wanted it to be faster so I decided to write it C++, which I have very limited knowledge in. Here's my code: #include <iostream> #include <string> u...
by the0nlyb0ss
on Sun Oct 03, 2010 8:37 pm
 
Forum: C and C++
Topic: Help with command line arguments?
Comments: 5
Views: 1330

Re: Using Python

Fabian is right, you have to manually install IDLE from the package manager...
by the0nlyb0ss
on Sun Oct 03, 2010 4:34 pm
 
Forum: Interpreted Languages
Topic: Using Python
Comments: 5
Views: 1448
Next

Return to advanced search