Forum: C Oct 6th, 2008 |
| Replies: 3 Views: 463 Something like this
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int recursivePalindrome(char *str, unsigned int index)
{
if (index > strlen(str)/2) return 1;
if... |
Forum: C Aug 29th, 2007 |
| Replies: 17 Views: 2,257 Since some compilers (and lint) will warn about discarded return values, an explicit cast to (void) is a way of saying "Yes, I've decided to ignore the return value from this call. |
Forum: C Aug 28th, 2007 |
| Replies: 17 Views: 2,257 This would be better
printf("Hit 'ENTER' to exit\n");
fflush(stdout);
(void)getchar(); |
Forum: C Aug 27th, 2007 |
| Replies: 3 Views: 2,202 Objective-C is a language based upon C, with a few additions that make it a complete, object-oriented language.
Objective-C is a language that implements true dynamic binding (which is required for... |
Forum: C Aug 22nd, 2007 |
| Replies: 6 Views: 770 I would highly recommend CodeBlocks (http://www.codeblocks.org/) |
Forum: C Aug 20th, 2007 |
| Replies: 6 Views: 957 Read this
http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx |
Forum: C Aug 19th, 2007 |
| Replies: 14 Views: 7,046 In C++, you can do something like this
#include <iostream>
#include <limits>
int main() {
// Rest of the code
//Clean the stream and ask for input
std::cin.ignore (... |
Forum: C Aug 19th, 2007 |
| Replies: 5 Views: 3,507 In case char *name="Yankee Duddle"; string literal turns into an unnamed, static array of characters, and this unnamed array may be stored in read-only memory, and which therefore cannot necessarily... |
Forum: C Aug 18th, 2007 |
| Replies: 6 Views: 1,422 You can make use of AGAR (http://www.hypertriton.com/agar/)
Agar is a set of libraries for developing graphical applications that are portable to numerous platforms. Agar is free software. The Agar... |
Forum: C Jan 1st, 2007 |
| Replies: 3 Views: 1,009 You don't need to start duplicate threads for same problem. Check this
Scheduling Algorithm (http://en.wikipedia.org/wiki/Scheduling_algorithm) |
Forum: C Dec 29th, 2006 |
| Replies: 2 Views: 4,979 Serial Port Programming (http://www.eng.auburn.edu/~doug/serial.html) |
Forum: C Dec 24th, 2006 |
| Replies: 2 Views: 3,089 Since you have worked for days on it, you must have done some research or some coding. Let us know about it. |
Forum: C Dec 21st, 2006 |
| Replies: 9 Views: 1,633 You certainely need to go through this site
http://www.c-faq.com/ |
Forum: C Dec 18th, 2006 |
| Replies: 2 Views: 2,208 So, what's your question? |
Forum: C Dec 18th, 2006 |
| Replies: 8 Views: 1,310 niek_e replied to that. Read again |
Forum: C Dec 18th, 2006 |
| Replies: 6 Views: 1,351 Well then you have to store it in a string. Because there's a limit of integers. Just accept the input as string and merge it. |
Forum: C Dec 18th, 2006 |
| Replies: 6 Views: 1,351 Input is always three numbers of two digits or it can be 'n' numbers consisting any number of digits? |
Forum: C Dec 18th, 2006 |
| Replies: 7 Views: 3,671 In addition to what above poster is saying, you need to seed the random number generator using srand(). |
Forum: C Dec 17th, 2006 |
| Replies: 2 Views: 1,034 Without your code I don't think people would be really keen to help you. |
Forum: C Dec 16th, 2006 |
| Replies: 1 Views: 4,647 For all functions, a domain error occurs if an input argument is outside the domain over which the mathematical function is defined. On a domain error, the function returns an implementation-defined... |
Forum: C Jun 1st, 2006 |
| Replies: 17 Views: 6,956 Now spammers will kill your ID :) :) |
Forum: C May 28th, 2006 |
| Replies: 10 Views: 5,452 We would really like to know how did you solved that. |
Forum: C May 28th, 2006 |
| Replies: 10 Views: 5,452 Read K & R. You'll know how to do that.
By the way why do you want to make your own malloc function? |
Forum: C May 26th, 2006 |
| Replies: 5 Views: 1,218 Don't you have a compiler at your place...go and check it there... |
Forum: C May 25th, 2006 |
| Replies: 17 Views: 6,956 |
Forum: C May 24th, 2006 |
| Replies: 17 Views: 6,956 while((std::cout << "Hello World"<< std::endl) == 0){} |
Forum: C May 23rd, 2006 |
| Replies: 3 Views: 1,043 I think if possible you should go as local as you can keeping in mind memory.
As far as processing power is concerned, you should'nt care unless you are working on a system having limited amount... |
Forum: C May 23rd, 2006 |
| Replies: 1 Views: 2,382 I would do something like this
const n=...;(*number of processes*);
procedure P(i:integer);
begin
repeat
entercritical(R);
<critical section>;
exitcritical(R); |
Forum: C May 23rd, 2006 |
| Replies: 4 Views: 994 Instead of
scanf("%s",line);
Do something like
fgets(line,20,stdin); |
Forum: C May 23rd, 2006 |
| Replies: 13 Views: 13,750 Yaa..I didn't see your edit...but since OP was simply comparing so I guess pointers version is no problem.
But, yes we should be careful about this. |
Forum: C May 23rd, 2006 |
| Replies: 7 Views: 3,100 ivanCeras plz use code tags. |
Forum: C May 23rd, 2006 |
| Replies: 4 Views: 994 What is problem you are facing?? |
Forum: C May 23rd, 2006 |
| Replies: 13 Views: 13,750 How is that link related to my reply??? |
Forum: C May 23rd, 2006 |
| Replies: 13 Views: 13,750 |
Forum: C May 23rd, 2006 |
| Replies: 13 Views: 13,750 Or
char *z = "Foobar";
char *t = "Foobar"; |
Forum: C May 23rd, 2006 |
| Replies: 6 Views: 1,407 You can use find and replace function of string class. |
Forum: C May 23rd, 2006 |
| Replies: 3 Views: 1,053 string str1="Function for a string";
string str2=str1.substr(9);
cout<<str2; |
Forum: C May 21st, 2006 |
| Replies: 1 Views: 1,992 Is this your code? I doubt it is. And stop posting in multiple forums. You have already been guided. |
Forum: C May 20th, 2006 |
| Replies: 4 Views: 854 I guess there's some problem here
*pCurrent = ptr;
This will break your list.
You need another pointer. Maybe this will help:-
void insertSortedList (Node **head, int value)
{
/* creating a... |
Forum: C May 19th, 2006 |
| Replies: 1 Views: 739 Linked lists (http://en.wikipedia.org/wiki/Linked_lists) |