Forum: C 22 Hours Ago |
| Replies: 14 Views: 424 I believe no questions are stupid. Please refrain from making such comments in the future. |
Forum: C 6 Days Ago |
| Replies: 14 Views: 424 @twomers
the first example is working fine.
"The #include thing only works on compile time. Not run time" - so you mean the binary will have all the contents of the the included file??? |
Forum: C 6 Days Ago |
| Replies: 14 Views: 424 @gerard4143 : I can't use dlls, I have a restriction.
@Dave : The first example is working, the structure gets populated with values in the inc file.
Thanks for the replies.
Ok, if its not... |
Forum: C 6 Days Ago |
| Replies: 14 Views: 424 Hi All,
Let me explain the problem.
I have multiple include files as in class1.inc, class2.inc, class3.inc etc. Contents of an include file will be like
class1.inc
{
"john", |
Forum: Geeks' Lounge 30 Days Ago |
| Replies: 16 Views: 4,210 You know it’s love when you memorize her IP number to skip DNS overhead
If at first you don't succeed; call it version 1.0 -- i think we can call it beta version also right?? :D:D lol
nice... |
Forum: C Feb 1st, 2009 |
| Replies: 2 Views: 479 You are right... "void * pointers says that it cannot be dereferenced"... I almost forgot that...
thanks... |
Forum: C Feb 1st, 2009 |
| Replies: 5 Views: 391 Hi,
I googled and found this... Hope it is not an offence to place links to other forums for information...
http://ubuntuforums.org/showthread.php?t=381626
Check that it might help you... The... |
Forum: C Feb 1st, 2009 |
| Replies: 5 Views: 391 The same code compiled for me.
Platform HP-UX
Which is yours? |
Forum: C Feb 1st, 2009 |
| Replies: 2 Views: 479 Hi All,
I am trying to write a common function called call which will take in a void* and an int type. Based on the int type it will have access to different structures. The code doesn't compile in... |
Forum: C Oct 22nd, 2008 |
| Replies: 2 Views: 439 Check this (http://www.math.lsa.umich.edu/courses/389/Projects/triangular_arrays.pdf) |
Forum: C Oct 22nd, 2008 |
| Replies: 2 Views: 1,044 This part is wrong...
if (a==0 && b==0 && c==0) {
opselect = 1;
else if (a==0 && b==0 && c!=0)
opselect = 2;
else if (a==0 && b!=0 && c!=0)
opselect = 3;
else if... |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 11 Views: 1,966 |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 1,380 Views: 147,510 Having Chicken sandwich... |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 9 Views: 1,199 |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 5 Views: 590 |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 3 Views: 466 |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 24 Views: 1,633 Yeah me too... dont know you... welcome back anyways... :P |
Forum: Geeks' Lounge Oct 20th, 2008 |
| Replies: 10 Views: 987 Yeah!!! True... the most complicated code we write should not be commented... It should be a piece of wonder and mystique for others... |
Forum: C Oct 20th, 2008 |
| Replies: 10 Views: 815 Pal... put that while inside the for loop and not outside... |
Forum: C Oct 20th, 2008 |
| Replies: 7 Views: 685 You can use fgets, check this (http://www.cplusplus.com/reference/clibrary/cstdio/fgets.html)... there is an example at the end... |
Forum: C Oct 19th, 2008 |
| Replies: 10 Views: 815 mmm... sorry... the place where we put is wrong... when the program is first executed there will not be anything in the buffer... so this will wait for something like that...
probably you can put... |
Forum: C Oct 19th, 2008 |
| Replies: 10 Views: 815 Why do we have to clear the input buffer, cause there will be a '\n' in the buffer once you press "enter" after entering anything... so next time when scanf comes around looking for another character... |
Forum: C Oct 19th, 2008 |
| Replies: 7 Views: 685 The code you have posted is full of syntax errors... correct it...
Meanwhile...
For repeating your code until the error is encountered you may use do-while or simple while or something like that...... |
Forum: C Oct 19th, 2008 |
| Replies: 10 Views: 815 Just clear the input buffer before you take the next input...
Do this...
char ch;
printf("Enter Birthday Details For User #%d? (Y/N): ",i+1);
while((ch = getchar())!= EOF && ch != '\n');... |
Forum: C Oct 19th, 2008 |
| Replies: 10 Views: 815 int years[SIZE];
int months[SIZE];
int days[SIZE];
The above variables are declared as arrays, they dont need to be arrays... simple variables would do...
int main(int argc, char **argv) |
Forum: C Oct 19th, 2008 |
| Replies: 10 Views: 815 First thing first...
You want to calculate the age of a particular user, why do want an array for that?...
Second...
/* Function Prototype */
int calAge(int currentYear[],int... |
Forum: C Oct 19th, 2008 |
| Replies: 4 Views: 1,323 Bottom line... you don't have graphics.h/the compiler doesn't know...
Dev-cpp does not come with graphics.h...
Read this (http://www.daniweb.com/forums/thread17709.html) thread... |
Forum: C Oct 19th, 2008 |
| Replies: 24 Views: 7,661 Hi,
If you just want to read a string with space termination, you could just use scanf...
If you want to print the read characters, just find the length of the string read and print it...
You said... |
Forum: C Oct 18th, 2008 |
| Replies: 9 Views: 574 As you are the programmer, you should be knowing the initial size of the data that will be coming... Moreover, does the increase in data size constant?... or is it varying?... If its constant, then... |
Forum: C Oct 18th, 2008 |
| Replies: 9 Views: 574 One thing is you need to reallocate memory dynamically... As you say calling realloc always for small data size ain't a good idea... In such a case you can allocate chunks of memory at time... like... |
Forum: C Oct 18th, 2008 |
| Replies: 15 Views: 2,279 Yes, EOF is an issue... but while entering the character where does EOF comes into picture?...
'\0' is out of bound when i == SIZE..
may be this can correct that..
while ((string[i++] =... |
Forum: C Oct 18th, 2008 |
| Replies: 15 Views: 2,279 This aint right...
for (i=0; i < strlen(string); i++){
string[i] = getchar();
}
strlen(string) will have some random number... you dont want that...
Salem is right... |
Forum: C Oct 18th, 2008 |
| Replies: 15 Views: 2,279 Just modifying Sci@phy's code...
while ((string[i++] = getchar())!='\n' && i < SIZE);
string[i]='\0';
This will do the trick... |
Forum: C Oct 18th, 2008 |
| Replies: 2 Views: 443 did you include your .h file in your .c file?... yeah i know its a silly question, but check it, who knows thats the issue... |
Forum: C Oct 18th, 2008 |
| Replies: 7 Views: 685 What is your problem anyways... No clue... seriously... one thing we know, you got a problem for sure... be more specific buddy... |
Forum: C Oct 18th, 2008 |
| Replies: 7 Views: 764 Please stop such talkings... Narue is far more experienced that you or me... No one has ordered him "Hey Narue, sit here and help this guy out"... he is volunteering... now that counts a lot... i... |
Forum: C Oct 18th, 2008 |
| Replies: 6 Views: 764 This code will given an run time error only if you have miss "&" in the scanf section...Please check your actual code if you have the &A[i] and not just A[i] in the scanf section... |
Forum: C Oct 16th, 2008 |
| Replies: 0 Views: 3,009 Hi,
For last one week I have been trying to do conversions between UTF8, Multibyte, Wide Character and Ascii... Finally managed to code a working program... Thought this might help some one, so... |
Forum: C Oct 16th, 2008 |
| Replies: 13 Views: 2,162 I take this back... I meant something else... Apologies guys...
I thought if there is space in the macro, the other arguments will be ignored and so I thought parenthesis was required... but thats... |
Forum: C Oct 16th, 2008 |
| Replies: 13 Views: 2,162 this is wrong
#define SWS pRCC->CFGR, B2+B3, 2
do it like this, include the braces...
#define SWS (pRCC->CFGR, B2+B3, 2) |