WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

He didn't rep me at all!! Let's ban him!

Aia commented: Here, don't complain +6
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Why a null terminator after each character input? I guess it was a typo.

char string[100];
for(int i=0;i<100-1;i++)
{
    string[i] = getch();
}
string[i+1] = '\0';

And yours has them too. Wrong location for the c-string terminator

char string[100];
for(int i=0;i<99;i++)
{
    string[i] = getch();
}
string[i] = '\0';
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Please

Please

Please

Don't bump your posts. It is agains the forum rules. 3 hours is not a long time on a forum. We'll get to you when the rest of our lives settle down....

In your functions:

int first()
{
     int employees;
     cout << "How many employees work here? ";
     cin >> employees;
     cout << "Number of employees is: " << employees << endl;
     while (employees < 2.0)
     {
                   cout << "Enter at least 2 employees to average!! ";
                   cin >> employees;
     }
     return 0;
}

So you've just entered the number of employees. But you don't return the value, so it is lost the moment the function returns. Same with the function second() .

And this function:

double quotient(int a, int b)
{
    int r, employees, days;
    a = employees;
    b = days;
    r=b/a;
    cout << "Days off average is " << r << endl;
    return 0;
}

is all wrong. Assignments are backwards and will never work as written. Check your notes again.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

perhaps that std::cout<<"n="; was meant to be std::cin>>n; ...

Or, more likely, that cout needs to be followed by that cin

BTW, there are some compilers that still use the deprecated headers, such as <stdlib.h> , or <iostream.h> ... for example, Borland's Turbo C++, which i am forced to use @ the university (which i hate)...

stdlib.h is not deprecated. It is a C header. Only the C++ headers with the .h are deprecated.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

getch(); does not work in graphics.h. I mean I need to input text.

And what makes you think it doesn't? What happened when you tried it?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Do you know Criss Angel personally? Uh, no. Do you know for a fact how many stooges are used in each of his stunts? Once again, the answer is no.

Really? And how do you know I don't know Criss? You don't know me well enough to make assumption about the people I know...

I am a magician, so you are treading dangerous ground making assumptions about me, and the people I know.

This is they type of post you would give bad rep on.... so be careful.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Maybe you should be more interested in why? I would :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Easiest way to sort two arrays at the same time is to create another array used as an index array into the two originals. For example:

string  words[20];
string  signature[20];
int     index[20] = {0,1,2,3,4 ... 18,19};

Now access signature array using the index array for the sort: signature[index[j]] You end up sorting the index array instead of the string arrays. Once sorted, access both signature and words using index and they still match.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

The third sounds like a compilation of fragments from the TV shows. If the bit you mentioned is on any of the three, it will be on that one.

It is a compilation of skits. It was their first movie but I'm not sure if they were TV bits or not. I don't remember seeing that skit in the movie, though.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Yea, I agree.. If he uses so many stooges then there would be some who would rat him out.. and tell others how he managed to do his tricks.. but all the same, most are probably stooges.

So Blaine uses stooges but Criss angel doesnt? They're magicians/illusionists, stooges are always involved in tricks/illusions involving more than one person, especially on tv. for starters the cameraman who has to get the right angles..

:icon_rolleyes: "I can't figure out how it's done so everyone's in on it." Pathetic... Illogical... And wrong...

But it's so easy just to say, "Everyone's in on it." Then to explain how it was actually done. And there's no doubt that they both have used stooges, but I'm sure a lot of his illusions are really illusions that even fool the people you see participate on TV.

Absolutely. At least you seem to understand a little more than these nay-sayers...

I tend to think the same way because I watched one episode where people were crying because they were in so much shock. I'm not saying it's real, I'm just saying he knows how to fool people. But there are some stuff that seems fake.

Same as who/what?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Heh, yeah you're right. People need to pick the names of these organizations better.

The SAM started in 1902. How were they supposed to know back then it would be this popular? :icon_wink:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Only Ancient Dragon has the correct answer. You cannot ++ or -- the same variable in the same statement. The C Standard says doing so is undefined and not guaranteed to give the answer you expect. See this and this.

Salem commented: Good FAQ links +9
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Read this.

Or this which would have been faster...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

The idea here is to make each character in the string exist in every position, for example:

string is "JOY"

so taking J:-
1st pass: "JOY"
2nd pass: "OJY"
3rd pass: "OYJ"

taking O:-
1st pass: "OJY"
2nd pass: "JOY"
3rd pass: "JYO"

taking Y:-
1st pass: "YOJ"
2nd pass: "JYO"
3rd pass: "JOY"

then remove the repeated results, and you'll get all the combinations for that string

But you missed YJO, so your algorithm is flawed. :icon_wink:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

... header files r dere...
... function definition r dere 4 d same header file...
... i shud follow 2 run ... there r ...

Are you related to Uncle Remus? Please read this. It's part of the rules of this board...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I don't know much about the society of american magicians but it can refer to the north american and south american continents maybe, so it could still be international.

OK I guess I wasn't clear. Chapters in
Australia
Austria
Canada
England
Germany
Hong Kong
Israel
Italy
Japan
New Zealand
Portugal
Puerto Rico
South Africa
Singapore
United Kingdom

International.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

There is no need to read up on printf. The <iomanip> library provides exact functionality as printf.

Boy is that a debatable statement! :icon_wink:

iamthwee commented: He he +11
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

graphics.h does not exist for Borland 5.5, so it won't work.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Sounds kind of like jealously to me. He is an awesome illusionist. If he is such a horrible magician please explain all of his tricks to me.

A horrible magician doesn't necessarily mean his tricks can be figured out. He may have no personality (David Blaine comes to mind) or just not entertaining. Maybe his tricks are lame but he does them well.

You can't tell me that the 100 or so people standing around are all set-up.

Why not? If 100 or so people are in on it, that's a small price to pay for the all the viewers that are fooled. And maybe all 100 are either magicians themselves, and/or magician's assistants/wives. Most of the people he has on Mindfreak are magicians.

Anyway, Penn and Teller gave away one of the magician's prized secrets to an entire theater audience just to blow away the TV viewers.

Criss Angel is an extremely talented illusionist/magician, possibly the best alive right now.

Very debatable. He is good. And he's probably one of the most popular with non-magicians at this time, but he's not the best. Believe me.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

But what I thought was funny is how they started NFL Europe but nfl stands for NATIONAL football league, even though those are new nations and it is an international league.

Well, the Society of American Magicians is an international organization, so why not NFL in Europe. :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Gee, if we had some idea what the error was we might be able to help.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

You've been around over a year and haven't read the Rules yet? You also need to read this. It will explain that you need to tell us what problem you are having so we don't have to guess -- among other things

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

#1: Please learn to format your code so we can read it.
#2: You added a line to the input file. Where did you add the read for that line?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

> Do you look like your avatar?.
He meant gender. And yes, I do look like my avatar. :-)

I don't look like mine --- much... :-)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

You walk down the hall and when you get to the glass case, you turn towards it and fine tune your position to stand in front of the basketball trophy.

Boy, some people are just dumb!

:icon_smile:

maravich12 commented: sarcasm....really sarcasm +2
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

whats a .dat file?

Generally a data file, used to hold info a program is to process

whats a .dll file?

A file that a program loads while running to add additional functions and procedures. In essence, a set of a system functions that are available to the program that you didn't have to write yourself.

how do you even make a .exe program that works?

Write a program without errors and compile it.

how do use this computer?

Depends on which computer.

whats a thread?

Something your grandmother sews with.

?

42

what does a .dll or a .dat file got to do with a .exe file?

See above

whats the extension for configuration settings?

Depends. .cfg, .ini, or anything else the programmer decides to use.

the configuration settings have something to do with the . exe file but what is it?

Initialize the way the program runs. And/or set up default valuesthe program will use.

???
???
???

To ask and not listen is to not ask.

And don't bump your threads, please. It's against the forum rules. You should read them...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

> In reality I will need to know both.
Learning C++ should do the job. Like I said, since C++ is the functional superset of C, knowing C++ should as such make you proficient in C, though I am sure many people here would disagree with it. ;-)

You're right, there will be disagreement.

C and C++ have different mindsets. Knowing C++ you may know the syntax of C, but because one is a procedural language and the other an OO language, knowing one does not necessarily give you the skills to write the other. At least not efficiently.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Each subject can be stored in individual files with questions and answers.

Read the file into arrays and use the random generator to output the questions and answers in random order.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Ambrosia -- 1st
Argent -- 1st
Asia -- 1st
Queen -- II or Night @ Opera
Styx -- Paradise or II
Boston -- 1st

Oops, that's 6 (or 8 depending on how you count). I never could follow instructions.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Guns are useful as many of you said.. for defense. Defense against other citizens, but most importantly defense against the government.

The thing that popped into mind was shooting government officials (tax men, police, ect) because the are bugging you.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I am just seeking help as I need it urgently.
I have read the other posts.

If you want help, you have to ask a question that can be answered. Details are necessary.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

First off "Salem", yes I have 25 posts and they were all me in my class requesting help on different topics. Actually I had good luck b/c people that were nice and helpful not so rude like yourself commented back I actually learned how to do that particular topic.

Salem's point is that you keep posting code that is hard to read because you never use CODE tags (the link he posted) and never read any of the rules for posting which also included this information. Salem was far from rude. It's those that continually post hard to read code when posting easy to read code can be done without effort that are rude. And CODE tags have been mentioned a few times in your 25 posts, too, which you ignored.

So read his link, and comply with this site rule, please.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Look into arrays and loops. Therein lies your path to enlightenment...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I didn't care for Rice's romanticized version of the vampire. I didn't even bother finishing Interview With A Vampire, it just didn't appeal to me. I think Salem's Lot was the best vampire book I've read.

Ineresting. I just watched the Smallville episode in which Lana became a vampire....

joshSCH commented: Happy Independence Day! :) +15
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Isn't astrology the "study of the stars"?

No, astronomy is the study of stars. This is astrology.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

can u type any random letters and save it as an .exe file and then run it and have it work?

what is an .exe file?

No. Random letters will rarely if ever generate executable code.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Did the OP really need 4 posts that say exactly the same thing? C'mon, people, one post is enough.

Aia commented: There's nothing like to beat a dead horse. +6
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Separate the number into 2 values at the decimal.
Convert the numbers into single integers using / and * and %
Convert each single digit to character (add 48)
Load the character values into your output array

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

K Thanks Can u give me ur Mail idn ur ASL PLz

Praneeth, please read this from the site Rules.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Save the first and second Fibonacci values (value1 and value2).

Loop, printing out all numbers between these values.

Move value2 to value1, generate the next Fib# stored into value2. Repeat the above loop.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

He suffered a heart attack or summit just after he performed, or before he performed, can't remember which, but it was due to that guys punch before hand.

Nope...

From what I've seen, Harry Houdini (if you're referring to another one please let me know) is supposed to have died from a combination of part of his own reputation and another person's impatience.

The way the story runs:

Close. The story goes:
Houdini was in Montreal in his dressing room. A college student was visiting him while Houdini was reading his mail. The student asked him about the the stomach punch stunt, got an affirmative answer, so he punched Houdini while he wasn't ready and ruptures his appendix. For the next few days he complained of stomach pain but did nothing. Finally while performing in Detroit he collapsed on stage and was rushed to Grace Hospital (the same hospital I was born in, by the way :)) By this time peritonitis set in and he was given a day to live. He finally died a week later on Oct 31.

Probability is that his appendix was in trouble before the punching incident, and was simply aggravated by the punches.
See this and this

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Yeah, and they risk their lives on a lot of the stunts that they do.That is how harry houdini was famous.

There is very little risk in what magicians do. Unless they're stupid. Criss Angel is rarely if ever in danger on any stunt he does. Just about everything that can go wrong is accounted for and a plan is in place to at least minimize the problem -- in most cases remove the problem.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Hey Dude,
TRy this Out
void main()
{
i=0;
while(i<256)
printf("\n%c",i);
}

Why would someone want to try an infinite loop -- a program that will never end and print NULLs forever?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Kennedy didn't deliver the promised air support during the bay of pigs invasion and betrayed the ani castro cubans and the CIA in not doing so. The CIA was then humiliated.

I heard just the opposite. Kennedy did not want the Bay of Pigs to happen. But the CIA promised everything was fine, and finally convinced Kennedy to go ahead. When the fiasco was over, JFK was humiliated and promised to dismantle the CIA.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Well, of course he's fake otherwise the government would be all over him. Every magician is fake. It isn't if they're doing it for real or not, it's how they do it and that is what's amazing. It doesn't make him a witch. Lol. It's just entertainment.

I take great exception to the statements "he's fake" and "Every magician is fake." Magicians are not fake. They are real people.

What they do is also not fake. They perform illusions -- which are not meant to be real, but you as an audience member cannot explain easily how the illusion is accomplished.

Please don't denegrate the profession by calling the magician fake. It's not nice... :icon_wink:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Marvin, not Martin, is my favorite martian.

I like Martin, too. I remember his show well.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

If need be? With a user name like that, you expect an active technically oriented member? :icon_twisted: (rhetorical post :-)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I am a beginner in computers, i would like to be assisted in writing a simple program that inputs a fraction in the form of a/b and c/d and culculates the sum and returns the answer in the simlest form as in p/q.

...

Lookin forward to your prompt and positive response.
thanks

Sure. But you didn't mention what help you need? Is there something wrong with your code?

Also, please read this and this. They will help you get the best help possible.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Shhh! Obviously Josh has SCIENCE to back him up!

I think he asked John and Jane Doe...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

No.. I'd think it would be much more distracting than that. On the radio, you simply listen to music or short news stories with commercial breaks every once in a while. A complete audio story sounds a bit much.. but then again I have never tried it.

Maybe for you, but there are a lot of us that can handle listening to something and driving. I listen to audio books, too.

But maybe he's right. Josh seems to know more about the world than the rest of us... :icon_razz:


I've been listening to the Prey series by John Sandford. Get the unabridged versions. They are quite good driving fodder. Many books by Koontz are also excellent. Favorites are By the Light of the Moon, Odd Thomas, and the two Snow books Fear Nothing and Seize the Night