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

WaltP: Huh? Community tab? Not sure what you mean.

There used to be a tab that when directly to "Coffee Shop" or whatever. Now, thanks to

Community Center doesnt have a text title? for me all the other sections have text names in the bar, bur community center just has the pic of the guy from the welcome video? took me bloody ages to find it

I see you didn't remove it, you just hid it. Seems both of us had no idea what the head meant.

Why do the tabs (Soft-Dev, Web-Dev, etc) have to be so large? They'd look better sleeker, about half as high and maybe 1/3 shorter.

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

So far, I like the look although I haven't explored fully. The first thing I noticed that I'd like corrected is putting the "Community" tab back on each page rather than accessed only at the bottom of the main forum page.

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

I wouldn't do it. Flashing a message in different colors is one of the most obnoxious things you can do to a user IMO.

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

You've obviously never had friends.

Ahh, when someone points out why your advice is lacking, you go to personal attack. I've been soundly trounced! :icon_rolleyes:

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

i made it upside :P that's not giving away the code.. right?

Debatable... :icon_wink:

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

Did you miss the sticky post entitled We only give homework help to those who show effort?
Or maybe the one titled Read This Before Posting?
What about The Rules?

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

Please read this, so we can follow your code. It will also show you some problems you can fix yourself.

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

I've looked at your post for about 5 minutes and have absolutely no idea what your question is about! OK, you're having a problem with a line. The line is only for reference -- whatever that means. Where do you explain what the problem is? Or what happens to show you it's wrong?

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

OK, done. Now what?

Nick Evan commented: Haha +11
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

i have two questions,please dont tell me that i violate dani web ruls because of my long
questions thank u.

As jbennet said, long Q's are fine, but your title is a violation. See the rules.
Sorry, you asked for it. :icon_twisted:

and the other question.

#include<stdio.h>
void main (){
clrscr();

 gotoxy(50,20);//one
 printf("*");

 gotoxy(0,0);//two
 printf("*");

 getch();
 }

when i wrote this program,it printed two stars next to each outer in the end of page
then i changed the place of two gotoxy and,program wrote them in right place?!!

See this about void main() If memory serves, [0,0] is not the upper left corner. Check your documentation. And did you specify the header file defining all those special Borland-only functions?

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

anything wrong here?

Yes. In addition to what the Dragon mentioned,
1) you need to fix your formatting so we can follow your code;
2) you are using feof() incorrectly. This will cause you problems when the function seems to be working;
3) never, ever use gets(). Gives you a major problem in the wrong hands;
Read the links...

Are you sure you are reading the values correctly? And why are you calling mainMenu() at the end of the function?

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

Be sure to use braces {} more often. It makes the code more readable, and you'll know you are grouping statements properly.

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

Congratulations on using:
- Code tags for your first post.
- int main(void) instead of the usual void main() for your first post.
You have a bright future ahead! :-)

Agreed! But loose a point for bad formatting, making your code very hard to follow.

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

The reason I'd code it w/o a loop is because it would take less time to hard code a few lines of '*' rather than spend time to think about the pattern then write loops based on it.

You've obviously never passed a programming course.

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

:icon_rolleyes:

while(in_put[c] != '\0')
{
	char *lttr = &in_put[c];        // why?  Just use in_put[c]
	if(*lttr != '\0'){              // if input is not \0
		upper_case(lttr, c);}   // convert it to upper case
	else                            // if input is == \0
		lower_case(lttr, c);    // convert it to lower?  
                                        // There is no lower for \0
	printf("%c", lttr[c]);

	c++;
}
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

No problem's here, either. Fox 2.0.0.3

Midi, you seem to be having problems no one else ever sees. Could your OS be damaged in some way?

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

I've to do a documentation of a project please tell some links of some sites where I can get the free source code of telephone directory management etc.

I didn't know there was free source code to telephone directory management etc. Where did you hear of this free code? Maybe you should start there...

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

Ok, i just realized what an idiot i am, i got the factor thing figured out, and putting in increasing order, but........can someone help me with the 4 factors per line...

Count each value you output. When you get to 4, output an endl and reset your counter.

... and each factor being in a field of 10...

This has already been answered by VernonDozier.

Hmmm it seems your using a while loop to check if the input was valid. I would just throw an exception:

I might too if I were a 3-year veteran in C++. But a beginner probably has no idea what you're talking about. :icon_wink:

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

I can't read it. Someone missed all 6 references to CODE tags that are all over the site.

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

i need to make a program on Human simulation.......
Well what i need is a code.

We don't give code. We give help. You give code.

when i am executing a program like am printing 'x' for infinite many times during execution when the console is printing x infinitely what can i do to stop that and 1 more

I usually press Ctrl-C which stops a program for my operating system.

i also need a statement that take input from user bu without waiting for user to input or if the user inputs nuffin in 2 secs the program shall proceed ahead .....................

C/C++ by definition cannot scan for a single character and continue. Some compilers have added extensions that can do it, but it's rare.

PLZ PLZ PLZ PLZ PLZ PLZ help me i really need buth of those or atleast the latter one.

And never post annoying things in your questions, like the green text and everything after it. It actually makes people want to skip your post.

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

Probably questions about programming in C. I assume lots of the stuff you learned in the course.

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

Then it looks like your nodes are broken. Are you sure your malloc worked? You never tested it's return

Maybe you should print curr and curr->next as you look through the list.

And after you've filled the node, print the values so you know all of them are filled properly.

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

Why devious ways to go?

Because your way is
1) too advanced for most people doing these simple problems
2) your IF cannot be understood by most novices.
IMO, your answer was more devious than a straightforward IF...ELSE .

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

How many people have to post the exact same message? Isn't one enough? :icon_rolleyes:

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

Hello..... I want to ask you something..... My teacher gave us our final exam last October 16 & 17.... I want to ask you about this question: Create a program that could show this output
*
***
****
******

If you'd try reading your post, you'd see that the question will never give you the proper answer. Your triangle does not give us the actual shape. Had you pressed PREVIEW you would have seen this. Wrap any lines you want to keep the proper formatting between CODE tags.

for(i=0;i<5;i++)
{
for(j=0;j<=i;j++)
{
printf("*\n");
}
}

Before posting code, format and test it first. You should never post working code as an answer to anyone's question (help them find the answer instead), and NEVER EVER post code that flat out doesn't work -- as your code doesn't. Twice.

There are a lot of ways you could produce that code using while loops or for loops, but most of them should not be coded using a while loop or for loop...

And what would you use? A switch statement? Don't just say something controversial (wrong), back it up with a reason. I for one always thought a loop is the absolute best statement to use to do a repetitive operation.

-------------------

Loop #1: Loop for each line.  Within this loop (nested is the term)
    Loop #2: Loop to print the spaces before  the *s (inner loop 1)
    Loop …
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Where is your main() function?

And please read the Rules, especially this section about thread titles.

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

You have a comment /* loop through linked list to find last node */ but there is no loop. Only a single IF statement.

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

To rephrase Sillyboy's explanation -- the functions do not return a value. Therefore there is no value to test == nor != against.

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

Please read this about using .eof() the way you are (it's the same as using feof() .

And read this about formatting your code so it can be understood.

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

Try this link. It's just a teeny more advanced than your compiler.

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

From when I programmed in C, I remember that output stream redirection is done by


a.out > filename.txt
or a.out < filename.txt

I don't remember which. One is input redirection, the other is output. I think the first is output.

1) Yes, the first one is output
2) How does outputting to a file get the data into memory?

It's not enough to see one word (redirection) and come up with an answer, you must read the entire problem and understand the question before attempting to answer (redirection to memory)

BITMAN, AFAIK, there is no way to redirect to memory. And even if you could, what good would it do? Once the program is finished, the memory is gone -- so the output no longer exists. But, even if the program continues to run keeping the memory active, another program cannot access it because the memory of one program is not accessible by another program.

There is a concept called shared memory that you might look into, but you still have the problem of redirection.

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

My bad. I thought he wrote a function. I didn't know the macro existed, never needing it.

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

The code you posted will have undefined behavior. cube(++x) could result in different answers on different compilers, so the ourput can not be determined exactly.

Why? It increments i, calls cube with the new value, then returns the answer to y. What's undefined about it? i isn't modified twice.

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

No wonder those links don't help. They have nothing to do with the problem.

First off, res is already binary. If you know the shift operator (<<), that makes it easy to count the 0's. Look it up and see what you come up with.

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

No

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

Why I need more than 30 minutes:

If you navigate to get a link or an object, when you return, the post text is GONE from the editing box. You must post it, and then edit it after you get the item into the clipboard.

With the torpidity of the Internet, you can get only two or three items before the time limit is reached.

You can always compose your post using some text editor such as Notepad or Word, then copy/paste into a DaniWeb post after you have finished.

or if you are using a current browser (last 6 years) and a multitasking system (Windows, MacOs, Linux, Unix, etc), before posting open another browser window or tab to find your links. Paste them into your unposted message and you don't need to worry about torpidity.

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

When you find you have a parameter that starts -t:, use strcpy() :

strcpy(websitename, &argv[p][3]);

p is of course the parameter number
3 points to the character after the colon

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

i think u might use the getch() putch combination
use getch to enter the charcter one by one and then using putch print out *

example:

getch(password[x]);  //where x runs in a loop from 0 till NULL
putch('*');

PS:go through this thread

[url]http://www.daniweb.com/forums/thread9916.html[/url]

has a better detailed solution....

This will work -- but only if you are using a compiler that defines getch() properly. Most don't.

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

AD is correct. Read This

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

You need to change your increment:

case 5: //move forward x number of spaces
        int steps = commands[ ++cmd ];

This will increment before you load steps, getting the number of steps.

ohnomis commented: solver of pre-incrementing instead of post-incrementing +1
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
strcpy(input,"          ");  // You don't need to do this if your next 
                                   //    line overwrites the value
   	scanf("%s",&input);        // see this
   	fflush(stdin);             // see this
Prabakar commented: nice links +1
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

i need a help so badly.

Then you should have read The Rules and the post Read This Before Posting

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

So much help, so little correct :icon_rolleyes:

To find the lowest value, store the first value read in a variable, say lowest. Then for each successive read, test the value read against lowest and replace if necessary.

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

Every solution proposed here has major problems -- that of trying to read an integer when a 'not a number' can be entered which screws up the entire read process..

You need to read an entire line as a string, test all characters entered up to the '\n' to make sure they are all digits. If they are, convert the string to an integer, if not, output an error.

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

To all of you, floating point values are rarely exact. Therefore testing with == will rarely work.

For example, if you entered 46, the actual value stored in the variable might be 46.000001 or 45.9999997, neither of which is equal to 46.

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

Thank YOU :)
but can you explain to me how col works?? i mean in the if statement

Every time you output a number, you increment col. When col is 3, 3 number have been displayed (3 cols) so you drop to the next line and reset col to count the next 3 values output.

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

tried that., if i do that the do/while loop stil executes at least once with a second Invalid Input request. :(((

Prove it. Just because you did the loop wrong does not mean the suggestion is bad. :icon_wink:

wow
its killer!!!
works great., thanx alot! thank you ))

i didnt know you can put statements inside conditions, its great!

No, it's terrible. A while statement like that is confusing. Just because you can do it doesn't mean you should.

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

I agree with thwee -- the for(;;) is nonsensical. If you are trying to keep your program window open, just do the get()

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

All you need to do is set up a do-while loop and read the input inside the loop.