It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 13 years ago.
I need some really ugly C macro (as an example, not to any real project), that does some simple thing (like adding one, for example) really hard and unreadable way.
Anyone has some idea?
#define new delete
#define True 0
#define False -1
#define BEGIN {
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
If I have to store and do an operation on integers in the wide range of [1, 10^50000]. How can I do them? How can I store such large integers values first of all? And, how can I perform basic operations on them subsequently?
There are specialized libraries for arbitrary precision that will help you with this. One I had success with is GMP.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Just the question! Why can it not sort more than 254859 elements?
It can, but:
It takes forever
You need to use data types that can hold enough elements.
Other than that, there is absolutely no reason why the algorithm itself would be limited to any particular input size.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'm coming from a script guy, used to functions within 50 lines.
And when I see frequently functions over 200 lines,I'm really having a hard time reading it.
Is this normal at all?
There is nothing in the language that makes functions "long" - you can write long functions in any reasonable language, and, ideally, should refactor them into smaller, more understandable and maintainable functions in most languages.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
please tell me about #define
i want to execute c program when i wrote p in the place of printf
using #define but how please tell me...
#define p printf
int main() {
p("hello world");
return 0;
}
#define P(X) printf("%d\n",X)
This only works for int tho. careful.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I want to use abc1 ,abc2, abc3,abc4,..abc100,as struct variable name. But I don't know how to set this? have no idea.
Can anybody help me out?
Thanks indeed.
It sounds like you're looking for an array.
typedef struct {
/* ... */
} whatever;
whatever abc[100];
abc[0] = xxx;
abc[3] = yyy;