![]() |
|
#11
|
||||
|
||||
|
Man... I am so relieved that got fixed! I was so disappointed spending days figuring out the php to highlight code only to find the CSS screwing everything else up!
What's next? Oh yes, the email notifications... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
||||
|
#12
|
|||
|
|||
|
c/c++ code:
// Hey emacs, this is a -*- C++ -*- file #ifndef _STACK_H #define _STACK_H #include <stdexcept> using namespace std; template <typename T, int max> class Stack { public: // C'Tor for empty stacks Stack() throw() { top = 0; } // Add t to the top of the stack void push(T t) { if(isfull()) throw overflow_error("Stack overflow!"); contents[top++] = t; } // Remove and return the top of the stack T pop(){ if(isempty()) throw underflow_error("Stack underflow!"); return contents[--top]; } // Will push() succeed? bool isfull(){ return top>= max; } // Will pop() succeed? bool isempty(){ return top==0; } private: int top; T contents[max]; }; #endif |
|
#13
|
|||
|
|||
|
Testing Post
c/c++ code: // Hey emacs, this is a -*- C++ -*- file #ifndef _STACK_H #define _STACK_H #include <stdexcept> using namespace std; template <typename T, int max> class Stack { public: // C'Tor for empty stacks Stack() throw() { top = 0; } // Add t to the top of the stack void push(T t) { if(isfull()) throw overflow_error("Stack overflow!"); contents[top++] = t; } // Remove and return the top of the stack T pop(){ if(isempty()) throw underflow_error("Stack underflow!"); return contents[--top]; } // Will push() succeed? bool isfull(){ return top>= max; } // Will pop() succeed? bool isempty(){ return top==0; } private: int top; T contents[max]; }; #endif |
|
#14
|
|||
|
|||
|
Another test
CPP / C++ / C Code:
|
|
#15
|
||||
|
||||
|
You could have saved yourself time and saved us from new posts by clicking "Preview" insted of "Submit". This would be a good thing to do always to make sure your post will look the way you want before hitting "Submit"...
__________________
During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence? |
|
#16
|
|||
|
|||
Re: GIDForums enables New [C] / [C++] bbcode.it is not clear. how can i get those seperate windows for my code part.
|
|
#17
|
||||
|
||||
Re: GIDForums enables New [C] / [C++] bbcode.Surround the code with [C] and [/C]:
This is your problem explanation. Now you want code: [C] CPP / C++ / C Code:
Now type more explanation. More code? no problem [C] CPP / C++ / C Code:
Now finish off your post. Be sure to click PREVIEW to see that everything looks right before clicking on SUBMIT. And don't forget to read the Guidelines __________________
During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence? |
|
#18
|
|||
|
|||
Re: GIDForums enables New [C] / [C++] bbcode.please send me some pointer example programs
|
|
#19
|
|||
|
|||
Re: GIDForums enables New [C] / [C++] bbcode.Yep
CPP / C++ / C Code:
Why not head the box with CPP / C++ / C Code:
Keep up the good work. |
|
#20
|
||||
|
||||
Re: GIDForums enables New [C] / [C++] bbcode.Quote:
I am not sure I got the problem; would you like for C code to have the heading "code" instead of "CPP / C++ / C Code"? How would that be better? Isn't the current heading more accurate? __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Php bbcode issue | Caged | MySQL / PHP Forum | 3 | 06-Aug-2003 19:55 |
| GIDForums enables New [KBD] bbcode. | admin | GIDForums™ | 0 | 24-Jul-2003 07:26 |
| GIDForums enables New [CSS] bbcode. | admin | GIDForums™ | 0 | 02-Jun-2003 00:57 |
| GIDForums enables New HTML BBCode. | admin | Web Design Forum | 0 | 17-Feb-2003 16:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The