Search Results

Showing results 1 to 14 of 14
Search took 0.01 seconds.
Search: Posts Made By: Lerner ; Forum: C and child forums
Forum: C Apr 5th, 2007
Replies: 4
Views: 3,275
Posted By Lerner
I see Ancient Dragon has typed faster than I and with a more precise version of what to do. As a learning experience here's a sampling of ideas I have about your code:

1) use int main(), not void...
Forum: C Apr 2nd, 2007
Replies: 29
Views: 3,334
Posted By Lerner
In the OPs recent posts he consistently does this:

for(i=0;i<=5;i++);{
for(j=0;j<=5;j++);{

Unfortunately the semicolon stops the loop before the opening braces become evaluated so they are...
Forum: C Feb 1st, 2007
Replies: 1
Views: 1,115
Posted By Lerner
First, when you post code to this board please enclose it in code tags. You can get instructions how to use them by reading the water marks in the text entry box for the board or by reading the...
Forum: C Dec 9th, 2006
Replies: 31
Views: 7,070
Posted By Lerner
Note, strcmp returns 0, less than 0 or greater than 0. It doesn't necessarily return -1 if the first parameter is less than the second. It may return -3 or -111, who knows. It will be less than 0,...
Forum: C Nov 27th, 2006
Replies: 31
Views: 7,070
Posted By Lerner
Hope something in here meets your needs and helps you understand the syntax.

char * wordArr[10];

means wordArr is an array of 10 char pointers, not that wordArray is a pointer to 10 char...
Forum: C Sep 11th, 2006
Replies: 11
Views: 5,022
Posted By Lerner
The comment about a ten year old being able to implement this type of process was meant to be funny, which is why I wrote HaHaHa afterword. It would be a rare ten year old indeed who could use the...
Forum: C Sep 11th, 2006
Replies: 11
Views: 5,022
Posted By Lerner
Any ten year old should be able do it!

HaHaHa!
Forum: C Sep 7th, 2006
Replies: 7
Views: 1,471
Posted By Lerner
Not being familiar with whatever curses is I still have a couple concerns with the code as posted.

First, main() should be declared with a return type, just like any other function. That return...
Forum: C Aug 24th, 2006
Replies: 5
Views: 2,282
Posted By Lerner
One concept that works no matter what base you are using to do the math is to realize that you don't do the arithmetical operation on the whole string/number at once, rather you do the arithmetical...
Forum: C Aug 22nd, 2006
Replies: 50
Views: 8,327
Posted By Lerner
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 500

void Add();
void Del();
//void Search();
//void Edit();
//void List();
Forum: C Aug 8th, 2006
Replies: 5
Views: 1,271
Posted By Lerner
You will have to sort all the information you want to print out before you print the information.

Obtain all items to print.
Sort items to print.
Print items.

The process that does the...
Forum: C Jul 28th, 2006
Replies: 30
Views: 22,495
Posted By Lerner
To "optimize" it a little further without getting too technical you could keep track of each prime along the way. Then to check if current number is prime just check to see if previous primes up to...
Forum: C Jul 13th, 2006
Replies: 13
Views: 5,333
Posted By Lerner
The first two lines of the triangle must be given. However, after that you can calculate each value on your own as needed. One way is to recognize that if you number the lines of the triangle 1 to...
Forum: C May 30th, 2006
Replies: 9
Views: 1,290
Posted By Lerner
I think "better" is in the eye of the beholder. For example: is it better to be short and obfuscated or lenthy and perfectly readable. Answer: Depends on what constraints you have. If memory is...
Showing results 1 to 14 of 14

 


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

©2003 - 2009 DaniWeb® LLC