~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Please try to search the forum with the required keyword and then post if your query here.

Maybe you should look here for solution
http://www.daniweb.com/techtalkforums/thread56763.html

Just integrate the sleep funtion given there below the display stmt in the while loop and thigs will work out fine for you.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hey there Sir, welcome to DaniWeb, i am sure you find the solution to all your problems here.

And btw even I like House, Simpsons and Scrubs :D

[EDIT] Arghh.. Miss Dani beat me to it [/EDIT]

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Our entire life is a continuous learning process, so be it Miss Dani or you, everyone is a student here.

And btw, Welcome to DaniWeb.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get all the sheets back to you with "hey dont spam" printed on it ;)

I put in Miss Dani's Laptop

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm so if you really think that way, then you know there is no one above you... You can just say no and the debate will just die out.
After all its "Dani's" web.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm yeah i know many communities which dont concentrate much on the presentation and only on the content (eg. PerlMonks you should really look at that site, you wont believe the amount of postings that site has seeing its simple design).

But still we should move along with times and if possible try to implement the changes which makes DaniWeb which is already rich in content and continuously growing, also the best in terms of presentation.

So it would be Content + Presentation while only one of these for the remaining sites. Does that not give DaniWeb an upper hand ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You get the fruit all "jam" med up

I put in a Java Applet.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why not try to get your doubts clarified at the forum specifically meant for QT design:

http://www.qtforum.org/

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I had come to this thread to post my postion and what do I see.

Curse you hijackers (To Wolfie and Mr. DMR)

Hope Mr. Happygeek comes down on you with his stick which he is at present bringing down on blog spammers (its really a big one from what i have heard :P )

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

yes that worked great
why
Code:
[10]

that makes no sense for me (newbie)

Because its the null terminator in the end which differentiates between normal character arrays and C Style Strings. Just remember to think of '\0' whenever you think of strings in C and life would be easier for you:idea:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Mine or yours? :cheesy: I'm good at misunderstanding things.

Hmm.. ok lets call this umm... a communication gap.

It's not '0', but it is the rest of 'em. The value 0 is pretty versatile after all.

But still i would call it 0 just to save my head all the extra swimming.
Versatile nature will be exploited by me when it comes to it.:P

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

ok one more question

why

[BUFSIZ] = {'\0'}

Initialization along with declaration.

This initializes all the elements of the char array which we are going to use as a C Style string to the null terminator which actually marks the end of C Style string. Safe and simple.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm looks like there is some misunderstanding here.

I was refering to the "zero" as you say which is returned by the isdigit (char mychar) which is used to test a condition using "if", "while"....

So the zero which returned by the function isdigit (char mychar) when it encounters a null character is actually 0 and not '0' or binary 0 or octal 0 or hexadecimal 0 and what not zero :D.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Please enclose your code in code tags before posting it, this is the second time i have edited your post to add code tags.

And as far as the code you posted is concerned, it doest work coz the dataype "char" is meant to store only a single character so whatever amount of text you try to put into it will store the first charcter only since it has the capacity of storing only one character.

This is the same as saying you cant store a real number in the integer datatype.

int result = 3 / 2;

Does result when printed out give you 1.5 ?
No because int only capable of handling integers without any fractional component in them.

If you are in need of the kind of functionality you require you can try out one of the many scripting languages out there. Interpreted, hassle free, lot of inbuilt functions, typelesss and ease of coding.

Some of my favourites:
1. Perl
2. Python
3. Lua

Hope it helped, bye.

[EDIT] Mr. Dragon beat me to it :D [/EDIT]

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You are getting one character as output since you using a container or a variable which can only store a single character (i.e. the char datatype)

Use a character array to take in user input and output it using

printf ("My string is %s " , my_char_array ) ;

Something like:

int main (void)
{
    char my_string [BUFSIZ] = {'\0'} ;
    printf ("Enter string: " ) ;
    fgets (my_string, BUFSIZ, stdin) ;
    printf ("\n%s", my_string ) ;

    return 0 ;
}

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

10 / 10

And they really misused the word set there ( collection of values none of which is repeated !! )

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm anyone heard of Ragnarok Online.
If no then I play that game and if yes then hmm.. (what is the level of your character ;) )

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Welcome to the forum. And i am sure you will get here all the help you need. Just keep posting and keep rockin...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

whether the little WYSIWYG editors should include a color selection tool, similar to Word, where users can highlight anything they want in any color they want.

Even i that case i go with Mr. Dave.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Unique

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

0 doesn't represent a digit.

Well thats news to me :cheesy: (maybe you wanted to say that 0 doesnt represent true condition )

The description of the function:

The function isdigit() returns non-zero if its argument is a digit between 0 and 9. Otherwise, zero is returned.

So if anything from '0' to '9' is encountered a non zero value is returned and if anything else 0 is returned which would invalidate the conditional stmt like "if", "while" etc.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Where is the variable which keeps tab of the total amount present with the user? You keep on using the variable "total" but i dont see it declared anywhere.

You can check after your switch stmt whether the user has the required amount of money to buy that drink. And if he hasnt got then you can jsut duck out of hte program. IF he has the required amount allow the user to select the drink of his choice and then post the remaining code you have written after the selection.

Keywords in C are case sensitive, you just cant get away by using it your own way.
Replace If with if Else with else .

If you want to compare two things using the == no spaces are allowed between the two equals.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Please refrain from ressurecting dead threads. Look at the date of teh previous post before replying.

Thread is now closed.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

3. Board (the 4x4 playing board that will consist of a 2-dimensional array of type int - int playingBoard[4][4])
4. Location (I'm not sure of this one, but this is the location or block that the pawn will move to on the board?...)

Why not make "Square" as a class since your board willl have many squares.

Each square can have:

1. Type of piece.
2. The player whose piece it is.
3. Position value (x, y)

Well this is one way of looking at things, you can have your own go at it.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I'm sure it was all in good fun, and hopefully AD will take it that way. Wee-wee doesn't have a habit of taking nasty jabs at other members. :)

Hmm... had no way of knowing it, just was doing my job so that the situation doesnt get out of hand.

Well anyways continue with your good natured humour :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

.X files are basically 3d model files which are used in game development. THey store the information about the object or characters polygons and the bones and joints present along with the animation sequences.

To open .X files you can use a free tool Blender which is used for manipulating and creating 3d objects which also supports .X files.

By the way, this is not a C++ related question but still i will let it pass.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The mind plays tricks on you when you get to your age.

Uncalled for and in no way relevant to the topic. Please refrain from personal comments Mr. Iamthwee.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@dc87

Please post what you have written so far ( your C code ) so we can help you out with the problems you are facing. Please dont expect a readymade answer.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I did not suggest he write to the same file that he's reading. read the sudo-code again please -- "write to new file"

Actually Mr. WaltP did not direct his comment to you.
If you will read the OP recent post:

if i want to write to a file, do i have to fread it first or just
fwrite it straight away ?

Mr. WaltP's comment I think is directed to the OP.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yeah, where were you guys when I was learning to code? I could have partied more and let you do my home work for me, too! :rolleyes:

Bang on target my friend.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I'm gonna play the part of a naysayer if ya don't mind. ;) You say you understand how OO works and all the concepts and such, right? If that's really how it is then not seeing a good fit right away means that OO might not be a good idea. For you, I think you're trying to apply organizational patterns with OO to a project that doesn't need it.

There's more to objects than just the full blown OO that you've prolly been learning. An object-based method is more common than an object-oriented method, if that makes any sense at all. :confused: When you write object-based stuff, it means that you're using objects for the data hiding and encapsulation benefits, but you don't really need inheritance and polymorphism for the organization benefits that only large projects really need.

When you write object-oriented stuff, the main win comes from being able to use inheritance hierarchies to organize the concepts in a big project. That's a full OO approach, and you don't really need it unless your project is too big to get a big picture view without getting a headache. :D

My (psychotic as my colleagues like to say) guess is that you're trying to go object-oriented and it's confusing you because you don't need that level of abstraction. If you drop down a level to object-based design, you'll prolly have more luck breaking your game concepts up into objects. :)

Thats the very thing i was trying to convey to …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Err... i dont want to be caught in the middle of "Lord of the forums: battle for colored text " but in my personal opinion, i completely agree with Mr. Dave. It would be really nice to see my code snippet in color rather than a dull shade of green. Even text editors today have syntax highlighters so why not DaniWeb.

I belive it just involves reading the keywords and all that stuff from the XML file and accordingly rendering the code and other things in color. Is it such a big overhead or are there some other issues ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I would strongly recommend you to try to simulate the programs you have written during your C days in C++. That would help you in gaining an OO perspective and make it to approach every problem in the OO way. Jumping head on in complex projects would only cause total chaos.

But still if you must have it, try these sites:

http://dmoz.org/Computers/Open_Source/Software/Games/
http://osswin.sourceforge.net/games.html

Best of luck.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Am really happy someone actually understands my thoughts and is a good candidate of being a global citizen.

Otherwise nowadays ideas like these are considered demented by the younger generation ( its not that i am graying, just 21 here )

Wish everyone just thought out of the box and leave the MY WORLD and MY THINGS idealogy, then the world really would have been a better place.

Thanks for the feedback.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

www.50megs.com

www.dot.tk

https://www.willandy.co.uk/freehosting.php

Actually i have already taken a look at those things and trust me they lack some or the other features.

The sites which i have recommended have support for both MySQL database and PHP files. And what more you can convert the space you own into a blog just with the press of a single button.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why not use some free web hosting services?

www.122mb.com
www.275mb.com

NO hassles good storage capacity. What else can one ask for ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm too much of these things makes me uneasy. We should pray to god that we are thankful as we are on the brighter side. Whats the point of the technology which doesnt benefit one and all ( i just wanted to post the image of famine in Sudan but... )

Wish god were revert everything back to primitive, no wars, no burning babies, no hate, no poverty.... *sniff*

Hint:: read my signature

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

great black cloak

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

was massive gaint

(looks like only the two of us are goign to make this whole story, better not inlcude the name of other members in the credits list :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

a evil druid

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

but then again, they deserve it!

Sad but true (wish the mod and team colleagues titles were given based on rep points :) and wish even i were a mod of Community Introduction section :) )

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm looks like i did some typing mistake in my previous post. But just to make my point concrete here is a small snippet:

circle<T>::circle(T a,T b)
{
  x1 = a;
  y1 = b; // you can keep even "a" here depends on ur requirement
  x2 = a;
  y2 = b;
}

Just write this additional constructor and everything should work out fine for you. And if your problem is solved post again so that others can gain help from it and the MOD can mark it as solved.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

best death magic-spell

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Should this thread be moved to the Software Development Job Offers forum for paid offers? ... That wasn't meant to be a joke or sarcastic comment. Should it?

Amen to that :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Wow Miss Dani, now animated avatars for MODS too ( i dont know if this feature was from the start or has been introduced recently since i saw it in Mr Salems avatar for the first time).

Maybe DaniWeb will become really really really famous some day so that we wont be needing those blasted ads and then maybe everyone would have animated avatars :twisted: and that too for free:mrgreen:

Just my 2 cents.