ndeniche 402 Posting Virtuoso Featured Poster

uuuu... and i just remembered...

here's my world famous recipe:

Ingredients:
flour
water
cheese (any cheese that will melt is fine)
margarine

First, make your flour tortillas, since it tastes better with fresh tortillas... (if you buy them made it doesn't matter)... this, you can do by adding enough water to your flour, until you get a heavy dough... make handfull-sized balls of this dough and expand them, so you can cook your tortilla...

once cooked, in another pan, melt about 1/4 bar of margarine.

Put your tortilla in the margarine and add enough cheese to fill your tortilla. Fold your tortilla in half and wait until it has a golden color on both sides...

presto! you can eat your hot flour tortilla with cheese fried in margarine (which is the name of my recipe... i was short of imagination at that time... :D)

ndeniche 402 Posting Virtuoso Featured Poster

what about something from my native country, Honduras?

CATRACHITAS (kahttrahcheetahs if you want the proper spanish pronunciation :P)

Ingredients:
Corn tortillas (like the mexican ones, for those who don't know what they are)
Fried beans
Cheese (i guess any sour cheese would be fine, and by sour i mean not sweet, even worse any fancy cheese... the less you know how they made it, the better!!! :twisted:)

First, fry the tortillas in vegetable oil, until its crunchy... (yummy)

Next, spread some fried beans to your fried tortilla.

To finish, just add some crumbled cheese to the top of your fried-beans-spread-fried -tortilla, and... voilá... catrachitas... simple, but really good...

ndeniche 402 Posting Virtuoso Featured Poster

why son't you create an array of strings, and store in each string each word of your sentece, so you just have to print your array of strings backwards...

i'm sorry... but as narue, and our queen of daniweb, her majesty dani (in the anouncements posted in every forum) have already told you, WE DO NOT GIVE HOMEWORK TO THOSE THAT DO NOT SHOW ANY EFFORT

ndeniche 402 Posting Virtuoso Featured Poster

why don't you better use cin and cout?

either way, it would be like this: scanf("%s",&word);

ndeniche 402 Posting Virtuoso Featured Poster

ok... maybe that was a little rough :P

ndeniche 402 Posting Virtuoso Featured Poster

i guess your mistake is not using break; after each case... if you don't do this, your switch will run all the way until all the cases are done...

another thing i would advise you to do is use the default until the end of the switch statement, since this way you will not have this kind of problems...

ndeniche 402 Posting Virtuoso Featured Poster

I insist... you should try wrapping your code in [[B]code[/B]][[B]/code[/B]] tags... that way it will be easier to help you

ndeniche 402 Posting Virtuoso Featured Poster

first, you should try reading this and this.

that way it will be easier to read your code...

ndeniche 402 Posting Virtuoso Featured Poster

The trick is to make a guess, determine your error and then make a new guess based on your error. You may also have to specify a required accuracy range (since you can't get perfect for many numbers using binary math). You make a loop which continually refines your guess based on your last error and exit when the guess is within your required accuracy range. I remember that the code was only a few lines of BASIC and it only needed to loop a few times for even very large numbers.

This is a good method, but it will NEVER return an exact answer...

ndeniche 402 Posting Virtuoso Featured Poster

hmmm... good to know...

ndeniche 402 Posting Virtuoso Featured Poster

there are some posts about optimizing c++ that might come in handy too... just search for them...

ndeniche 402 Posting Virtuoso Featured Poster

jesus... can't you let me be the hero just for once?? :P

i mean... i knew you couldn't be serious when you said it was impossible... just let me be happy...

ndeniche 402 Posting Virtuoso Featured Poster

man... you have serious problems with basic c++ programming...

first, you have no need of using that much variables... i guess three variables will be enough...

second... why all those validations? i really don't understand what is the idea before every while loop...

perhaps you should consider wrapping your text in code, that way, we could read it better...

ndeniche 402 Posting Virtuoso Featured Poster

there are two things you could do to help those who want to help you...

first of all, wrap your text in code tags[[B]code=c[/B]][[B]/code[/B]]...

second, try using a title that suggests what your problem is next time...

ndeniche 402 Posting Virtuoso Featured Poster

>is there any way one could do a square root program without sqrt or pwr functions?
No, those functions are magic. There's no way you can simulate their behavior in C++ without pixie dust or phoenix feathers. One might assume that if you know how the mathematics work, you could come up with a sensible facsimile, but in reality, only compiler writers are capable of creating such things...

I'm sorry, but i will have to disagree with that, since, a little time ago, one of my teachers asked the same thing, and there's a simple solution just as the one sturm suggested...

int main(){
   int c,n;
   float a,b,d=1;
   printf("Input a number\n");
   scanf("%d",&n);
   c=n-1;
   for (a=0;a<c;a+=d){
      b=a*a;
      if (b==n){
         b=a;
     a=c;
      }else{
     if (b>n){
        a-=d;
        d/=10;
     }
      }
   }printf("The square root of %d is %3.4f\n     Press >>ENTER<< to exit",n,b);
   getchar();
   getchar();
   _exit(0);
   return 0;
}

That will return any exact square root for any whole number... if you want a square root for a number with decimal points, you have to do some modifications... but that's the main idea...

ndeniche 402 Posting Virtuoso Featured Poster

pretty clever using ajax...

that's a nice one...:P

ndeniche 402 Posting Virtuoso Featured Poster

>>the vote is because some people want to get rid of it

it's not like we want to get rid of it... it's just that we can survive with no colors... at least that's the case for me...

ndeniche 402 Posting Virtuoso Featured Poster

well... that are all good points, but i meant moderating rep points that have no reason to be...

i mean... i don't care about rep points (i'd probably get -rep for that though), but there are people that actually do... that is why i concern...

that would be to avoid what joeprogrammer said... that people gives away -rep points to everyone with no reason at all, and fill the comment field with random letters... that is what my point was... not moderate the points as in the moderators point of view, but having a subjective, non selective, point of view and moderating those points given with no reason...

By the way... that was a good one... its out in the field where rep points are worth...

sk8ndestroy14 commented: Yep. +2
ndeniche 402 Posting Virtuoso Featured Poster

I guess it would be a pretty hard work for mods... but, why not validating bad rep points? I mean, before they are assigned to someone, being checked if the reason is valid by a mod?

ndeniche 402 Posting Virtuoso Featured Poster

Well, now we know where that 21st vote came from.

yup... that was me... :P

i didn't mean any harm though...:D

ndeniche 402 Posting Virtuoso Featured Poster

> you can't imagine how annoying that is...
You bet we do, we have been here long enough... ;-)

That was for the new ones... 'cause i know you do know... :D

ndeniche 402 Posting Virtuoso Featured Poster

>> Plus, when you read the thread, there's a handy "goto first unread" link so you can immediately start with the new information. That essentially makes "solved" a non-issue for me, because I don't care whether the OP can be bothered to accurately update the solved status of the thread (most of them can't anyway).

The problem is, maybe the problem the thread starter is looking for is not what the other posters respond, so, sometimes it comes really in handy to read the whole thread... even more when you haven't been posting in it from the beginning, you kinda lose the whole point if you don't read the thread from the beginning...

>> Just do "Mark forum as read" at the end of every visit.
the problem is, lets say you go to sleep, and there are new posts on this thread, you read the posts you missed to notice that in the last post there is a message saying "thank you very much"...

ndeniche 402 Posting Virtuoso Featured Poster

first of all, you shouldn't name your thread with than name... maybe that way, other members would know what is your problem...

ndeniche 402 Posting Virtuoso Featured Poster

that's why i try to encourage ppl to, at least for mercy, mark their threads as solved, since it causes HUGE wastes of time for us, since (me for example) tend to read the whole thread to be careful not to post a repeated hint or something like that, just to become aware in the end that the last post is from the thread starter saying "thanks, i found what i was looking for" or anything like that...

you can't imagine how annoying that is...

ndeniche 402 Posting Virtuoso Featured Poster

my guess is your problem is in the call for the function: stdev(x[6],6) you haven't any variable x, so, there you should change 'x' for 'grade'...

>> }while((grade[i]<0.00)||(grade[i]>4.00)); you should rather include 0.0 and 4.0, so it should be while((grade[i]<=0.0)||(grade[i]>=4.0)); >> total = total + grade[i]; i'd rather use total+=grade[i]; which is the same thing...

ndeniche 402 Posting Virtuoso Featured Poster

then, why not better make the comment box a required field when giving bad rep? this way at least you know why you are being bad repped... how about it?

ndeniche 402 Posting Virtuoso Featured Poster

Actually, i've never used colors, and i've managed to survive... and it's pretty annoying reading text in various colors... it is actually a hedache (literally) reading something with too many font variations...

i'd rather read a text that uses just bold and italic text than reading underlined, colored text...

so i wouldn't mind if colors were banned at all, though it seems there are some posters that NEED colors...

ndeniche 402 Posting Virtuoso Featured Poster

>> I think Paris Hilton should be in jail for the rest of her life
What have people in jail done to you so you want to punish them in that way?

ndeniche 402 Posting Virtuoso Featured Poster

It is a little difficult to get 2 NY from Central America... it would be really fun though...

unless someone wants to donate a flight to NY and backwards... :P

ndeniche 402 Posting Virtuoso Featured Poster

Dear poster:

we don't actually have any issues with answering your doubts/questions or solving your problems, but it would be very time saving for us (problem solvers) if you could please mark your threads as solved when your problem has been solved, since, when you don't do that, we read the whole thread from the beginning to finally see that it has already been solved.

Thanks

ndeniche 402 Posting Virtuoso Featured Poster

i thought a rule for posting was not using titles such as this one...

and... could you plz mark it as solved when your question is answered?

ndeniche 402 Posting Virtuoso Featured Poster

Respected Sirs/madam... Your' S Obediently Krishu

awww... come on... there's no need to do that...

by the way... i thought titles should lead the readers towards what the thread is about...

Asking for answers to be sent to you is against the rules.

Why does anyone read the rules??

ndeniche 402 Posting Virtuoso Featured Poster

Why would it give you an error?

You said 'char*' and not 'const char*', so it's perfectly reasonable from a syntactic point of view to allow you to modify what it points to.

thank you... thank you very very much...

that's what i've been trying to say all along...

get it now?

ndeniche 402 Posting Virtuoso Featured Poster

because it is modifying the first character of your string... why don't YOU understand?? in that case, the value in ptr is the address of the first character of the string, so, when you assign the pointer to that address a different character, you are changing the first letter of your string

ndeniche 402 Posting Virtuoso Featured Poster

first of all... i think it is very clear in the rules for posting that you shouldn't name your thread with names such as "help", or things like that...

second, think yourself as memory as a huge shelf,a pretty huge shelf, where you save information in bit sized boxes... when you create a pointer, you are telling the compiler to look for an empty shelf to start writing... when the compiler does this, information is stored in these shelves, so, your *ptr withdraws the information in your shelf...

in case of strings, your pointer will grab a group of shelves, which will store one character each, so, when you do this:

char *ptr="Literal String";

*ptr will return 'L', so... what happens when you tell the compiler to assign to *ptr another character (lets say 'd')? When you print your string, it should say "diteral String"

why? because your variable ptr is pointing to the first character in your string... you shouldn't manipulate a pointer to a string as it was stored in the same place in memory, because, what a pointer to a string does in memory is that takes the first "shelf" to store the first character, and then continues into other shelves...

get the idea?

ndeniche 402 Posting Virtuoso Featured Poster

why don't you better post your code, so we can see where your problem is?

ndeniche 402 Posting Virtuoso Featured Poster

thnx guys...that was really helpful

ndeniche 402 Posting Virtuoso Featured Poster

which is the best compiler to work on java?

ndeniche 402 Posting Virtuoso Featured Poster

does someone know of anywhere i can find tutorials 4 VB 6? I'm on vacation, so i have plenty of time to hang around, and i would love to learn VB the way it's suposed, since at college i had a teacher that was a total jerk, so... plz someone lead me the right way...

ndeniche 402 Posting Virtuoso Featured Poster

actually i imagined something like that was going on... i knew that "\0" was still there...

i didn't know that for sure though... thnx...

ndeniche 402 Posting Virtuoso Featured Poster

if you can't prove that it's correct, it's horribly broken

I know it is horribly broken... actually, i wouldn't use it myself...

its just that i was in a desperate situation you know? i HAD to do it... i didn't find any other solution... :D

ndeniche 402 Posting Virtuoso Featured Poster

LOL
actually that worked for me once... that's why i recommended it ;)

ndeniche 402 Posting Virtuoso Featured Poster

First of all , it is a C program

darn... that was a close one... :P

Yes i know char accepts only single and wht u suggested Gel is exactly wht I tried but it did not work.

Why don't you try reading it as a string, even though it is a char? this should end with the buffer problem... this way:

scanf("%s",&answer);
ndeniche 402 Posting Virtuoso Featured Poster

Get DEV ! Why are you stuck with Turbo C++ ? BloodShed is problably one of the best compilers out there and compiles efficiantly.

it's not 4 me that i'm talking... as i've explained in others posts, i rather work in bloodshed's than in borland's, but, there's lots of peeps that must work in turbo because of work, college, university (like me), or other circumstances... so, i recommend you post solutions for users of any kind of compiler, because we all not have the privilege to work in our predilect compiler of c++...

ndeniche 402 Posting Virtuoso Featured Poster

If you need to using some timing functions to time your programs output then theres nothing more perfect than using windows sleep command.

The problem is, this command doesn't work on every program... i.e. Turbo C++ doesn't recognize this command...

ndeniche 402 Posting Virtuoso Featured Poster

i guess maybe web designers will have more experience in intranet and web pages... i mean... i get the idea... but beyond that, i'm blindfolded

ndeniche 402 Posting Virtuoso Featured Poster

have you tried posting your question @ Web Development instead of @ software development?

ndeniche 402 Posting Virtuoso Featured Poster

could you be a little more specific?

ndeniche 402 Posting Virtuoso Featured Poster

why not better do it less complicated:

for (i=0;i<=5;i++){
   do{
      cout<<"Enter grade "<<i<<" on a scale from 0.0 to 4.0: ";
      cin>>grade[i];
   }while ((grade[i]<0.00)||(grade[i]>4.00));
}
ndeniche 402 Posting Virtuoso Featured Poster

nonetheless, i found out that clock() works different depending on which compiler you are working... 4 example... in dev c++, i measured clock measured 1/1000... but turbo c++ measured 1/20...

the thing is... i don't know why...