Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
41% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
3 Commented Posts
0 Endorsements
Ranked #27.9K
Ranked #2K
~2K People Reached
Favorite Forums
Favorite Tags

6 Posted Topics

Member Avatar for Süspeñce

OMG... Try this code: [CODE=cpp]#include <iostream.h> #include <assert.h> #include <stdlib.h> enum TokenType { tkOpen, tkPlus, tkMinus, tkMult, tkDiv, tkClose, tkNumber, sizeTokenType }; const char chars[sizeTokenType] = { '(', '+', '-', '*', '/', ')', ' '}; const int priority[sizeTokenType] = {0, 1, 1, 2, 2, 5, 10}; template <class T> class …

Member Avatar for Süspeñce
0
386
Member Avatar for efigen

Do you mean something like this: [CODE=cpp]void fibonacci(int i, int & result) { if(i < 2) result = 1; else { int prev, prev_prev; fibonacci(i - 1, prev); fibonacci(i - 2, prev_prev); result = prev + prev_prev; } } int main() { int n; fibonacci(6, n); cout << n << …

Member Avatar for efigen
0
461
Member Avatar for chii18

Try something like this: [CODE=C] printf("n="); scanf("%d",&n); /* <--- You should get address here !!! */ for (x = 1; x <= n; x++) { for(y = 1; y <= n - x + 1; y++) printf("%d",y); printf("\n"); } [/CODE]

Member Avatar for prvnkmr449
0
96
Member Avatar for techie1991

It's about [B]all-access checking[/B] ([URL="http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/C_002b_002b-Dialect-Options.html"]3.5 Options Controlling C++ Dialect[/URL] for additional info). Go to Project -> Project Options -> Compiler -> C++ Compiler and set "Turn off all access checking option" to [B]No[/B]. This will disable your warning.

Member Avatar for Kanoisa
0
573
Member Avatar for guru_iyer

Try this code: [CODE=C] for(i = 0; i < len; i++) { r = r * 2 + (bin[i] == '1' ? 1 : 0); }[/CODE]or [CODE=C] for(i = 0; i < len; i++) { r = r * 2 + (bin[i] - (int)'0'); }[/CODE]

Member Avatar for volvo877
0
518
Member Avatar for y2kshane

[QUOTE]can i declare operator overloading function as a friend function?[/QUOTE]You can, but you need function woth two parameters: [CODE=cpp]friend time operator + (time& left, time& right);[/CODE]

Member Avatar for Stefano Mtangoo
0
293

The End.