
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
28.08.2004, 04:31
|
|||
|---|---|---|---|
|
|||
int ##x |
|||
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Выдает ошибку: example.cpp(9) : error C2065: 'intx' : undeclared identifier Почему препроцессор видит intx, а не int x? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
28.08.2004, 04:39
|
|||
|---|---|---|---|
|
|||
int ##x |
|||
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Такой код рабочеспособен. Только почему появляется проблема с int ##x, пока не понятно. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
28.08.2004, 12:26
|
|||
|---|---|---|---|
int ##x |
|||
|
#18+
// a zacem ispolizovati ##, bez nih toje rabotaet ... #include<iostream> using namespace std; #define foreach(x,a,b,c) for (int x=a; x<b; x+=c) int main(void) { foreach(x,1,8,2) cout<<x<<endl; foreach(b,1,8,2) cout<<b<<endl; return 0; } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
30.08.2004, 12:34
|
|||
|---|---|---|---|
|
|||
int ##x |
|||
|
#18+
Token-Pasting Operator (##) The double-number-sign or “token-pasting” operator (##), which is sometimes called the “merging” operator, is used in both object-like and function-like macros. It permits separate tokens to be joined into a single token and therefore cannot be the first or last token in the macro definition. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=57&tablet=1&tid=2034487]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
50ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
36ms |
get tp. blocked users: |
1ms |
| others: | 203ms |
| total: | 326ms |

| 0 / 0 |
