Search Results

Showing results 1 to 40 of 255
Search took 0.02 seconds.
Search: Posts Made By: Hiroshe
Forum: C Aug 24th, 2009
Replies: 9
Views: 467
Posted By Hiroshe
When you post code, use code tag's like so:

<code here>


qsort() (http://www.cplusplus.com/reference/clibrary/cstdlib/qsort/) is what your looking for.
Forum: C Aug 22nd, 2009
Replies: 5
Views: 256
Posted By Hiroshe
How do you fit a a name and an email address in char's? You probably want: char studName[256]; and char email[256];. To be safe against buffer overflow's, use fgets() to get the strings.
Good luck.
Forum: C Aug 20th, 2009
Replies: 15
Views: 487
Posted By Hiroshe
Those while-getchar's look like they just clear the buffer (up to a newline). You can get rid of those, and put a getchar after each scanf to keep the buffer clear at all times. Remember if you have...
Forum: C Aug 19th, 2009
Replies: 15
Views: 487
Posted By Hiroshe
Yeah, you never returned anything out of main.
After "Run Calculator Again? (y/n)" is printed, the program immediatly exits. This is becouse there is newline left in your buffer. Use getchar() to...
Forum: C Aug 18th, 2009
Replies: 2
Views: 273
Posted By Hiroshe
What do you mean by version 3 C? There are only 2 versions made by ANSI/ISO; C89 and C99.

Anyway's, what compiler and operating system are you using? What is the exact error message? Does it do...
Forum: C Aug 17th, 2009
Replies: 2
Views: 261
Posted By Hiroshe
Just a guess, but the assembly stage would probably be used for computing the location of lables and such. It would be more efficiant to compute them at this stage than cumputing them from higher...
Forum: C Aug 14th, 2009
Replies: 11
Views: 694
Posted By Hiroshe
Wow sorry, I really didn't mean to get anyone mad. :( Yes, I have compiled everyone's code. Here's what the output looked like on the modified version of yours:
tWeNtY fIrSt CeNtUrY bReAkDoWn -...
Forum: C Aug 13th, 2009
Replies: 11
Views: 694
Posted By Hiroshe
Replace wordoffset = -1; with wordoffset--;. :P
Forum: C Aug 13th, 2009
Replies: 3
Views: 1,037
Posted By Hiroshe
Please make a new thread. As you can imagine, answering two question's in one thread could get confusing.
Forum: C Aug 13th, 2009
Replies: 3
Views: 1,037
Posted By Hiroshe
Wait, is it multiplication like your title says, or is it addition? How many polynomial's will their be?
If there are only 2 polynomial's and you want to add: Load monomial's into list 1 (store...
Forum: Geeks' Lounge Aug 12th, 2009
Replies: 307
Views: 21,938
Posted By Hiroshe
Listening to what ever this is. (http://www.youtube.com/watch?v=59ZX5qdIEB0)
Forum: C Aug 12th, 2009
Replies: 22
Views: 1,046
Posted By Hiroshe
I don't understand what the problem is, can you be more specific? Where about's in the code are you talking about?
Forum: Geeks' Lounge Aug 12th, 2009
Replies: 13
Views: 2,183
Posted By Hiroshe
I wonder how much memory worth of game's he has by now.
Forum: C++ Aug 12th, 2009
Replies: 16
Views: 376
Posted By Hiroshe
Which is better, knowledge of just C++, or both C++ and C? It's nice to have a variety of languages, even if their old.
Forum: C++ Aug 12th, 2009
Replies: 16
Views: 376
Posted By Hiroshe
>You can start online but, you will need great dedication and self motivation to push yourself and not just give up on the basic first problems that you will face.
Yeah, that's a real issue. If you...
Forum: C Aug 12th, 2009
Replies: 5
Views: 408
Posted By Hiroshe
Use code tags, it make's you post look nicer:

<code>


Don't use void main() ever again except when telling other people to not to use void main()! Use int main(), int main(void) or int...
Forum: C Aug 11th, 2009
Replies: 5
Views: 320
Posted By Hiroshe
>Isn't so a virtual address is allocated to it by the compiler.
Hmm... I'm not 100% about the internals of gcc, but dosen't the compiler handle the variable's for any given object (including...
Forum: C++ Aug 11th, 2009
Replies: 16
Views: 376
Posted By Hiroshe
No, it's often not the best place to start from. Lot's of CS teachers in high school are not good. Not all, but lot's. This is probably becouse most of the good one's are teaching university classes....
Forum: C Aug 10th, 2009
Replies: 11
Views: 471
Posted By Hiroshe
Yes I can code it for you. But I am not. Glad I was able to answer your question.

If you where able to write the code at post #3, it should be easy to covert what I had written into C. If you...
Forum: C Aug 10th, 2009
Replies: 5
Views: 342
Posted By Hiroshe
You for got a double quote in the first printf. :P
Change if ( input[i]<0 || input[i]>9) to if ( input[i]<'0' || input[i]>'9'). '9' is different than 9.
Use fgets() instead of gets(). It's safer....
Forum: C Aug 10th, 2009
Replies: 4
Views: 679
Posted By Hiroshe
You don't have any divide's in there. You can't just use modulo for the whole thing. Also, you forgot to read the number backwards.
Forum: C Aug 10th, 2009
Replies: 11
Views: 471
Posted By Hiroshe
Just add a check to see if the user input is equal to the key in the loop.
It might look like:
let pin = 1234
let count = 0
let in = 0

while count is less than 3 and in does not equal pin
...
Forum: C Aug 10th, 2009
Replies: 11
Views: 471
Posted By Hiroshe
Look at this:
if(i==pin) //First time, the input is checked
printf("The PIN is correct.\n");

else
{
printf("Invalid PIN.\n");
while(a!=3) //Is it being checked in this loop?
{
...
Forum: C Aug 10th, 2009
Replies: 11
Views: 471
Posted By Hiroshe
Use code tag's in your post to make it easer to read:

Code here.


You have no int infront of your main(). :P
Forum: C++ Aug 10th, 2009
Replies: 2
Views: 408
Posted By Hiroshe
You need a library that can support HTTP. I've never used it, but libcurl (http://curl.haxx.se/) sound's like it will do the job.
Forum: C Aug 10th, 2009
Replies: 5
Views: 342
Posted By Hiroshe
Or loop through the string and check if any char is between the acsii value's of '0' and '9'.
Forum: C Aug 9th, 2009
Replies: 8
Views: 354
Posted By Hiroshe
Seed the prng with the time. See the example on the end of this (http://www.cplusplus.com/reference/clibrary/cstdlib/rand/) page.
I wonder why the example has a combination of puts() and printf(). :P
Forum: Geeks' Lounge Aug 9th, 2009
Replies: 1,549
Views: 200,216
Posted By Hiroshe
“It's hard to beat a person who never gives up.” - Babe Ruth
Forum: Geeks' Lounge Aug 9th, 2009
Replies: 89
Views: 3,932
Posted By Hiroshe
I'm not into politics, but it kinda sounds like kid's playing on a playground. Imagin that each country is a group of kids. You have leaders of the group, and you have followers. Can you imagin these...
Forum: C++ Aug 9th, 2009
Replies: 3
Views: 321
Posted By Hiroshe
Look up how to make and use (http://www.cprogramming.com/tutorial/lesson4.html) functions.
By the way, use code tags in your post.
Good luck.
Forum: C Aug 9th, 2009
Replies: 13
Views: 24,897
Posted By Hiroshe
This is the second time this old thread came back to life. Let this thread RIP!
Use code tags, don't use conio.h, there is no int infront of your main and don't post code without OP doing any work!
Forum: C Aug 9th, 2009
Replies: 8
Views: 354
Posted By Hiroshe
Did you move printf("Would you like to play again? (y/n): "); & again = getchar(); down a bracket? It worked on my computer. After you win a game, it will ask you to play again.
Nice program :)
Forum: C Aug 9th, 2009
Replies: 8
Views: 354
Posted By Hiroshe
Aha! Which loop is again = getchar(); in?
It's in while(correct == 0) not while (again == 'y').
Forum: C Aug 9th, 2009
Replies: 8
Views: 354
Posted By Hiroshe
In your inputguess() function, put getchar() after each of your scanf's. Scanf leaves a newline in the buffer from my understanding.
Forum: C Aug 8th, 2009
Replies: 10
Views: 663
Posted By Hiroshe
It's rather hard for us to debug a function without ever seeing it. Check to see that you don't accidentally write to 'matrix' instead of '*matrix' (or '*matrix[]').
Good luck.
Forum: C Aug 8th, 2009
Replies: 2
Views: 263
Posted By Hiroshe
You used void main() instead of int main(). Any parent process will have no idea if the program ran properly or not.
Try attaching to code if it's long. It make's the thread's easer to read.
Forum: Game Development Aug 8th, 2009
Replies: 2
Views: 373
Posted By Hiroshe
In the time capsule in my back yard. I may or may not open it up in the future. :P
Forum: C Aug 8th, 2009
Replies: 3
Views: 372
Posted By Hiroshe
What do you want to do exactly? It sounds like your talking about functions.
void child(void);

int main(void) {
child(); /* Call child process */

return 0;
}

void child(void) {
Forum: C Aug 8th, 2009
Replies: 10
Views: 663
Posted By Hiroshe
What does your print function look like?
Take a look at this (http://c-faq.com/~scs/cclass/int/sx9b.html).
Forum: Game Development Aug 8th, 2009
Replies: 2
Views: 373
Posted By Hiroshe
Hey guy's. I've never really cared for game dev befor, but it sounds kinda fun. I'm expecting a spair class next year and need to have something to do in my spair time. I'm thinking of making a clone...
Showing results 1 to 40 of 255

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC