Posts
 
Reputation
Joined
Last Seen
Ranked #174
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
84% Quality Score
Upvotes Received
133
Posts with Upvotes
112
Upvoting Members
66
Downvotes Received
22
Posts with Downvotes
18
Downvoting Members
17
37 Commented Posts
~269.05K People Reached
About Me

Have an AS in computer science... specializing in c++ and windows api. I am a machine gunner for the VA Army National Guard. I have a private pilot's license. I also like to play guitar. Also a fan of my hometown team, the washington redskins. I have…

Interests
Flying, programming, guitar
PC Specs
Gateway PentiumIV 400mhz bus 1gb DDRAM
Favorite Tags
Member Avatar for coldkiller

I am intruiged with this assignment.. although it's been years since I balanced a chemical equation.. I would find this to be a fun challenge. You teach me how to balance chemical equations.. I'll give you some code. Start me off with something simple.. and I'll code you an answer …

Member Avatar for Hariharan_1
1
7K
Member Avatar for restrictment

That looks like quite a time investment.. cool ascii art too. How long did all this take you..??!?

Member Avatar for emeraldamerican
0
6K
Member Avatar for sheltask

when it took me 6 months to figure out how to add basic resources to a win32 project.... and going through 5 compilers just to change window background color, i knew this **** was just to messed up. i'm glad i stopped at just c++ or else i would be …

Member Avatar for Less_1
1
824
Member Avatar for jcAmats

one thing is ye' need to call srand() somewhere in order to seed ye' random number generator. I would load your entire text file into a data structure, line by line, and then get lines out of the data structure at random. [code] vector<string> text_file; int line_counter = 1; string …

Member Avatar for zia shaikh
0
1K
Member Avatar for snehil_khanor

You declare main() to return an 'int' type... but nowhere do you have a 'return' statement in your main() function. [CODE] int main() { ... ... yadda yadda .... ... etc etc. .... ... ... return 0; }[/CODE]

Member Avatar for dessy_1
0
3K
Member Avatar for arguav74

I'll show you what I'd do, maybe it will give ye' some ideas on how to handle ye' problem: 1. Get a sentence to translate from the user [code] #include<sstream> #include<string> #include<iostream> #include<cctype> cout << "Enter sentence to translate to pig latin: "; cin >> user_input;[/code] 2. Parse the sentence …

Member Avatar for Schol-R-LEA
0
1K
Member Avatar for SolidSora
Member Avatar for Mahfuz_1
0
313
Member Avatar for Shinedevil

When testing for primes, you only need to test half the range: [CODE] bool is_prime = true; cout << "Enter a numeral: "; cin >> number; if(number == 1 || number == 3) { cout << "Number is prime."; exit(0); } for(int i=2; i<number/2; i++) { //If there is any …

Member Avatar for Mahfuz_1
0
398
Member Avatar for aramil daern
Member Avatar for Echo89
1
480
Member Avatar for BevoX

just out of curiosity i am trying to measure the performance of my basic algorithm vs. your algorithm... but i am having a math problem; for some reason I cannot peform this division: [code] seconds = (end-start) / CLOCKS_PER_SEC; [/code] i viewed the value of CLOCKS_PER_SEC as defined in the …

Member Avatar for Microno
1
674
Member Avatar for Riteman

this will create 12 "computer" objects and open 12 .txt files: [code] ifstream computers[12]; for(int i=1; i<13; i++) { string file("comp"); file += itoa(i); file += ".txt"; computers[i].open(file.c_str()); if(!computers[i].is_open()) { cout << "\a\nError, file #" << i << " unable to be opened!"; cout << "\nFile may be been moved, …

Member Avatar for angham kh
0
4K
Member Avatar for steveaustin

Here is a little something to get ye' started: [code] #include<iostream> using namespace std; ////////// User Defined Abstract Data Types //////////// struct Record { int quiz_1 ; int quiz_2 ; int midterm ; int final ; } ; class Grade_Calculator { public: void menu( ) ; void add_a_record( ) ; …

Member Avatar for dagurr
0
705
Member Avatar for kusel1030

[code] string lines[69]; int i=1; while(getline(infile, lines[i])) { i++; }[/code]

Member Avatar for omarelbeik
0
249
Member Avatar for kisseric

Talk about resurrecting the dead on Halloween.. never seen a post this old get bumped to the top in a long time (this thread originated back in 2004!)

Member Avatar for manujkathuria
-4
1K
Member Avatar for logicmonster

[code] //Provides ability to write to the dos console (cin/cout) #include<iostream> using namespace std; int main() { int input = 0; cout << "Enter t or f: "; cin >> input; do{ if(input == 't') { cout << "True"; } else if(input == 'f') { cout << "False"; } else …

Member Avatar for lance p
0
305
Member Avatar for Clinton Portis
Member Avatar for Nick Evan
0
159
Member Avatar for henri18

in my opinion, you should write functions that evaluate everything from royal flush to high card: //function prototypes bool is_royal_fush(hand[7]); bool is_straight_flush(hand[7]); bool is_4kind(hand[7]); bool is_full_house(hand[7]); bool is_flush(hand[7]); bool is_straight(hand[7]); bool is_3kind(hand[7]); bool is_2pair(hand[7]); bool is_pair(hand[7); int get_high_card(hand[7]); Some hands might qualify for several winning scenarios, so it is important …

Member Avatar for Lerner
0
480
Member Avatar for Zemorg

I'm just briefly looking at your code, but is there any case where the size of s[i] would be less than 2? if so, you'd then be subtracting 2 and passing a negative value to substr(): `tmp[i].ID=s[i].substr(1, s[i].size()-2);` furthermore, your starting position is '1', so is there any case where …

Member Avatar for Clinton Portis
0
1K
Member Avatar for infogirl

//Dynamic 2D memory allocation float* matrix = NULL; float** userMatrix = new matrix*[10]; for (int i=0; i<10; i++) { *userMatrix[i] = new matrix; }

Member Avatar for mrnutty
0
151
Member Avatar for niceyout

> Quoted Text Herehello i am creating a tictictoe game , however i cannot get the program to check if the player has won or not . and produce a you have won message void win_check(char Map[10]) { //Row checks for(int i=0; i<10; i+=3) { if(Map[i] == Map[i+1] && Map[i+1] …

Member Avatar for niceyout
0
167
Member Avatar for nekoleon64
Member Avatar for Clinton Portis

Fun game for the raging compulsive alchoholic gambler, such as myself. Although the game may vary among casinos, the basic premise is the user picks 10 numbers out of 80. The computer will randomly draw 20 numbers out of 80. If you matched with any of the computer picks, you …

Member Avatar for PrimePackster
0
1K
Member Avatar for vissure
Member Avatar for naraayanan
Member Avatar for Captain Neo

One problem may be that [I]you never initialized [U]any[/U] of your variables.[/I] [CODE] //These could literally be any value. int n,x,i,j;[/CODE] Here you create a variable 'j', and make a whole bunch of loop conditions that are based on 'j'... 'j' could be anything...... [CODE] for([B]j[/B]=(2*[B]j[/B]-1);[B]j[/B]>0;[B]j[/B]--)[/CODE]

Member Avatar for PrimePackster
0
178
Member Avatar for Dman01

if the EOF flag is set and it's giving you problems with seekg(), try clear()'ing the object and see if that works for ye'.

Member Avatar for Dman01
0
251
Member Avatar for mustad104

i've actually looked up youtube videos to teach myself this somewhat complex topic... never actually studies flow systems. i got the basic concept and can do some simple examples. i am down with your code, but i am not down with flow systems. if we put our heads together we …

Member Avatar for Clinton Portis
0
729
Member Avatar for KingAudio

int types do not support floating point decimal. try using double types, and if you desire a set precision, you can go even further and use float's. with your calculator application, it is possible to prompt the user for a desired precision, in which case you would use float types. …

Member Avatar for richieking
0
132
Member Avatar for ahoysailor

[quote]so can only search for the IDS_STRING part. How can I achieve that?[/quote] try a little somethin' like this: [code] vector<string> text_file; //load the vector........ //find substrings in your vector: for(int i=0, size=text_file.size(); i<size; i++) { if(text_file[i].substr("IDS_STRING") != string::npos) { //found } else { //not found } }[/code] [quote] I'm …

Member Avatar for Clinton Portis
0
176
Member Avatar for mncoc

I can give ye' some help with solving a quadratic equation in c++, but I have no help for ye' when it comes to MFC. I could even help you solve the equation symbolically as opposed to a close decimal approximation.

Member Avatar for mncoc
0
162