Search Results

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: CStallion
Forum: C Jun 12th, 2006
Replies: 8
Views: 1,228
Posted By CStallion
I am not familiar with this STL vector you speak of....???
Forum: C Jun 12th, 2006
Replies: 8
Views: 1,228
Posted By CStallion
Thanks! now is there a way that I can make a shortcut for that? say...if I wanted to make a function arraycount(array) how would I do that so I don't have to type tha long stuff?
I'm not talking...
Forum: C Jun 11th, 2006
Replies: 8
Views: 1,228
Posted By CStallion
I just need to know how to count the entries of an array like this one:

string array[] = {"entry", "entry", "entry", ... , "entry"};

Thanks!
Forum: C++ May 26th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
But then the message "Press any key to continue..." won't appear...
so I'd just have to make an extra line of code like cout<<"Press any key to continue..."; cin.get();
Forum: C++ May 26th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
What is the best way to pause?
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
So...how about them tutorials?
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
The book that I'm using (C++ for dummies) doesn't cover that. Any tutorials or resources you'd recommend to get started?
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
I would eventually like to have the program linked to a text file so that others (I do plan to distribute someday) can add to the program themselves. But unfortunately at this time I don't know how...
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
Good call about the memory. But I'm trying to keep the program from lagging noticably. If it initializes a whole bunch of 20-entry strings at once, it'll probably take a few seconds and the user will...
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
I like this one but I want to avoid declaring all strings at once and then choosing (honestly I might have dozens of 20-entry arrays, I'm not sure how many arrays I will need yet). But you gave me an...
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
NOOOOOO!!! I was trying to avoid using pointers (I am still new enough to have n00b pointerphobia) but I'll work with your suggestion and see what I can come up with. But instead of using const int...
Forum: C++ May 25th, 2006
Replies: 15
Views: 19,419
Posted By CStallion
I am having problems with a code that I would like to go something liek this

string array;
int z = rand()%2;
switch(z)
{
case 0:
array = {"entry 1","entry 2",...,"entry...
Forum: C++ May 25th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
I'm not sure what his skill level is, I was just suggesting an alternative to brute force computing if he was interested in such alternatives.
About picking off numbers ending in 6 or 28, the 'if'...
Forum: C++ May 25th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
Gotcha. Sorry for the misunderstanding.
Forum: C++ May 25th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
Perhaps to those unfamiliar with number theory. (Forgive me, I forget that not everyone loves math like I do.)
The mersenne prime statement was a joke, but the second part may actually be useful....
Forum: C++ May 25th, 2006
Replies: 19
Views: 4,799
Posted By CStallion
You could find all the mersenne primes then subtract 1 ;) or osmething like that.
Also, perfect numbers can only end in 6 or 28, so your search can be greatly expediated by eliminating all other...
Forum: C May 24th, 2006
Replies: 3
Views: 1,045
Posted By CStallion
Forum: C May 23rd, 2006
Replies: 3
Views: 1,045
Posted By CStallion
disclaimer
I'm a programming n00b so I may not know what I'm talking about.
/disclaimer

My question boils down to scopes.
Let say I have code

{
string mystring1;
string mystring2;
Forum: C++ May 23rd, 2006
Replies: 5
Views: 1,482
Posted By CStallion
Thanks guys, that did it :)
Forum: C++ May 23rd, 2006
Replies: 5
Views: 1,482
Posted By CStallion
Tru dat. But the compiler keeps giving error "conflict" or "redeclaration". So I was just double checking here because at this point in my program it would be REALLY inconvenient to fix it!
Forum: C++ May 23rd, 2006
Replies: 5
Views: 1,482
Posted By CStallion
int r = rand()%2;

switch(r)
{
case 0:
string x[] = "Hi.";
break;

case 1:
string x[] = "Bye.";
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
I think a foot is worth like 10k on the black market. That should hold me over for a while...besides, once limb regeneration via stem cells is made public, I'll get my foot back. But, hey, if we'll...
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
Haha. Well, more or less. I worked for the university tutoring mathematics during normal fall and spring semester. But once the semester is over, I don't have a job. The tutoring center is open...
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
Well what the program is for is a drill in common french verbs, and my hope is to have it ready before summer classes start, so that maybe if some of my classmates are interested I can sell it for...
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
:o tee hee no I'm not sure what portable means. Just reading other threads I deduced that it meant that the code will work on other computers with software or os different from mine.
:o
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
I think I'll settle on this sample code I made up that sends the string to a function which changes the color then outputs colored string then resets back to color of original text. Thanks for the...
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
But if I write the program so that others can use it on their computer then my overloaded function might not be portable?
Forum: C++ May 23rd, 2006
Replies: 12
Solved: Console Color
Views: 9,385
Posted By CStallion
I know how to change the console text color using this code
HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, ###)

But suppose I need to...
Forum: C++ May 18th, 2006
Replies: 5
Views: 2,066
Posted By CStallion
But I still do. I'll just have to make do with what it's giving me.
Forum: C++ May 18th, 2006
Replies: 7
Views: 12,537
Posted By CStallion
Good! I changed my IDE font to the font "terminal" and then inserted the é straight out and everything worked fine. Thx!
Forum: C++ May 17th, 2006
Replies: 5
Views: 2,066
Posted By CStallion
Thanks! That takes care of the redundancy redundancy. But the "Good!" is still in the wrong place. Do you think that it could be because when I input I have to press ENTER and that is also putting...
Forum: C++ May 17th, 2006
Replies: 5
Views: 2,066
Posted By CStallion
I apologize, the topic of this thread has nothing to do because this post was started about a parse/syntax error but I solved it on my own and now this is something else, hopefully simple!
I have...
Forum: C++ May 17th, 2006
Replies: 7
Views: 12,537
Posted By CStallion
So I try "\-126" and get a compile error. Any other ideas?
Forum: C++ May 17th, 2006
Replies: 7
Views: 12,537
Posted By CStallion
I need to insert a "é" and other such symbols. At first I just tried using é straight out in C++ and it returned Θ. So I looked at my character map and did the unicode version \u00E9 where I wanted...
Forum: C++ May 17th, 2006
Replies: 2
Views: 975
Posted By CStallion
Ah, I fig'd it would be something simple like that. Thanks =)
Forum: C++ May 17th, 2006
Replies: 2
Views: 975
Posted By CStallion
Hi everyone. I'm new, but I'll be here for a while I think :cheesy: . Here is my code so far. The delays are because I wanted to simulate typing =).

//
#include <cstdio>
#include <cstdlib>...
Showing results 1 to 36 of 36

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC