Search Results

Showing results 1 to 40 of 153
Search took 0.01 seconds.
Search: Posts Made By: SpS ; Forum: C and child forums
Forum: C Oct 6th, 2008
Replies: 3
Views: 463
Posted By SpS
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
Solved: Stupid Question
Views: 2,257
Posted By SpS
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
Solved: Stupid Question
Views: 2,257
Posted By SpS
This would be better

printf("Hit 'ENTER' to exit\n");
fflush(stdout);
(void)getchar();
Forum: C Aug 27th, 2007
Replies: 3
Views: 2,202
Posted By SpS
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
Posted By SpS
I would highly recommend CodeBlocks (http://www.codeblocks.org/)
Forum: C Aug 20th, 2007
Replies: 6
Views: 957
Posted By SpS
Read this
http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx
Forum: C Aug 19th, 2007
Replies: 14
Views: 7,046
Posted By SpS
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
Posted By SpS
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
Posted By SpS
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
Posted By SpS
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
Posted By SpS
Serial Port Programming (http://www.eng.auburn.edu/~doug/serial.html)
Forum: C Dec 24th, 2006
Replies: 2
Views: 3,089
Posted By SpS
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
Posted By SpS
You certainely need to go through this site
http://www.c-faq.com/
Forum: C Dec 18th, 2006
Replies: 2
Views: 2,208
Posted By SpS
So, what's your question?
Forum: C Dec 18th, 2006
Replies: 8
Views: 1,310
Posted By SpS
niek_e replied to that. Read again
Forum: C Dec 18th, 2006
Replies: 6
Views: 1,351
Posted By SpS
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
Posted By SpS
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
Posted By SpS
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
Posted By SpS
Without your code I don't think people would be really keen to help you.
Forum: C Dec 16th, 2006
Replies: 1
Code Snippet: EDOM: Domain Error
Views: 4,647
Posted By SpS
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
Posted By SpS
Now spammers will kill your ID :) :)
Forum: C May 28th, 2006
Replies: 10
Views: 5,452
Posted By SpS
We would really like to know how did you solved that.
Forum: C May 28th, 2006
Replies: 10
Views: 5,452
Posted By SpS
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
Posted By SpS
Don't you have a compiler at your place...go and check it there...
Forum: C May 25th, 2006
Replies: 17
Views: 6,956
Posted By SpS
:eek: :eek:
Forum: C May 24th, 2006
Replies: 17
Views: 6,956
Posted By SpS
while((std::cout << "Hello World"<< std::endl) == 0){}
Forum: C May 23rd, 2006
Replies: 3
Views: 1,043
Posted By SpS
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
Posted By SpS
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
Posted By SpS
Instead of
scanf("%s",line);
Do something like
fgets(line,20,stdin);
Forum: C May 23rd, 2006
Replies: 13
Views: 13,750
Posted By SpS
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
Posted By SpS
Forum: C May 23rd, 2006
Replies: 4
Views: 994
Posted By SpS
What is problem you are facing??
Forum: C May 23rd, 2006
Replies: 13
Views: 13,750
Posted By SpS
How is that link related to my reply???
Forum: C May 23rd, 2006
Replies: 13
Views: 13,750
Posted By SpS
My guess--random numbers
Forum: C May 23rd, 2006
Replies: 13
Views: 13,750
Posted By SpS
Or

char *z = "Foobar";
char *t = "Foobar";
Forum: C May 23rd, 2006
Replies: 6
Views: 1,407
Posted By SpS
You can use find and replace function of string class.
Forum: C May 23rd, 2006
Replies: 3
Views: 1,053
Posted By SpS
string str1="Function for a string";
string str2=str1.substr(9);
cout<<str2;
Forum: C May 21st, 2006
Replies: 1
Views: 1,992
Posted By SpS
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
Posted By SpS
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
Posted By SpS
Linked lists (http://en.wikipedia.org/wiki/Linked_lists)
Showing results 1 to 40 of 153

 


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

©2003 - 2009 DaniWeb® LLC