Search:

Type: Posts; User: prophet

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    861

    type 2 is actually better.. Type 1 holds all that...

    type 2 is actually better.. Type 1 holds all that memory until the end of the program...type 2 can actually free up that memory on that spot.
  2. Replies
    6
    Views
    1,499

    That is the most basic way of sorting but your...

    That is the most basic way of sorting but your idea is correct now. Glad I could help =)
  3. Replies
    7
    Views
    1,413

    Re: multidimensional array

    use indentations to spot errors easier. Your code seems fine...its your cout statement that is wrong. Basically when you cout like that your printing out the 4th element in the 2nd array. So in...
  4. Thread: Html

    by prophet
    Replies
    12
    Views
    1,720

    .swf files(flash code) can be decompiled...

    .swf files(flash code) can be decompiled...
  5. Thread: Square

    by prophet
    Replies
    4
    Views
    1,194

    You just did the program for him. The point is...

    You just did the program for him. The point is that you're supposed to help him understand the concepts...not GIVE him the program =P
  6. Replies
    6
    Views
    1,499

    you have two problems in your code. First off...

    you have two problems in your code. First off you only sort only between two elements that are NEXT to each other...what about the stuff before them? For example:

    21 20 18 2 //pretend thats...
  7. Thread: Completely OOP

    by prophet
    Replies
    4
    Views
    2,289

    C++ is slower than C in only some ways. OOP will...

    C++ is slower than C in only some ways. OOP will no doubt be slower than regular procedural/functional calls just because it causes a bit more of an overhead. If you code in C++ using C syntax(such...
  8. Replies
    4
    Views
    1,375

    you can get visual.net academic for free if you...

    you can get visual.net academic for free if you goto one of microsoft's seminars. They throw them at various schools throughout the region. I went to one in philadelphia(temple) and I got...
  9. Thread: Html

    by prophet
    Replies
    12
    Views
    1,720

    disabling right clicking is not even worth it. ...

    disabling right clicking is not even worth it. You can still click on view->source if your in IE or whatever. You can TRY to block people with frames but again its easy to get around by just...
  10. Replies
    6
    Views
    3,169

    Your describing a vector...in that case there is...

    Your describing a vector...in that case there is a standard template library for it. It is also more efficent to DOUBLE the size of the new array instead of increasing it by one. Just think of how...
  11. In programming often times you will have to do...

    In programming often times you will have to do something on every OTHER increment. A nifty trick I picked up that makes that idea very easy.



    for(int i=0;i<10;i++)
    if (i%2 == 0)
    //do...
  12. Thread: array

    by prophet
    Replies
    13
    Views
    1,317

    Re: Re: Re: array

    wanna see something messed up that me and a friend discovered? In g++ and bcc i know this error occurs...but in VC++ it does not.



    void main()
    {
    int *arr = new int[10];
    arr[5] = 4;
    ...
  13. Replies
    13
    Views
    1,717

    are you trying to flip the console? Basically IF...

    are you trying to flip the console? Basically IF you had everything stored in a 2D array you just do what everyone said. Just think of your screen as a 10x10 matrix (or whatever size you want) and...
  14. Thread: array

    by prophet
    Replies
    13
    Views
    1,317

    Re: array

    like the post below said it will take up 100bytes of memory. This is why variable reuse is a good idea especially for temporary variables such as incremental counters ("i" is often used for that)...
  15. Replies
    6
    Views
    1,083

    i'm sure there are programs written for this...

    i'm sure there are programs written for this already. The point being is that this isn't a request for program board...if you want a custom program I would suggest you pay a custom program price.
  16. Replies
    3
    Views
    944

    I think he means something like this: ...

    I think he means something like this:



    struct blah {
    int number;
    string stuff;
    }

    sorting algorithm(blah a[])
  17. Replies
    7
    Views
    1,853

    I'm assuming that you would need to do some sort...

    I'm assuming that you would need to do some sort of threading if you want real time stopping (stopping the watch at exactly the time you hit the key). Unfortunately I have never messed with...
  18. Replies
    2
    Views
    904

    classes in any compiler is the same. What...

    classes in any compiler is the same. What exactly do you not understand...
  19. Thread: recursion?

    by prophet
    Replies
    5
    Views
    1,048

    Recursion is a way to simplify code. There is...

    Recursion is a way to simplify code. There is ALWAYS a base case (if you forget this step you will get an infinite loop) which will exit the function. Recursion will not work for everything.. a...
  20. Thread: Phone Class

    by prophet
    Replies
    5
    Views
    2,041

    Well its almost the same as the constructor for...

    Well its almost the same as the constructor for example:


    class controlbox{
    private:
    phone system[10];

    int CM; // checking messages
    int HU; // hang up
    int busy; // line busy
  21. Thread: Delay

    by prophet
    Replies
    5
    Views
    1,753

    Re: heres my code

    Yah its correct but, your coding style is pretty bad. Why do you have so many if statements for the SAME condition?

    Try looking up switch/case statements since it will help simplify your code. ...
  22. Thread: Items....

    by prophet
    Replies
    14
    Views
    1,212

    I would use a case statement since it'll be...

    I would use a case statement since it'll be easier to add in extra features later on and plus its easier to read than 3 if statements.


    #include <iostream>

    int main()
    {
    int x;

    cin...
  23. Replies
    5
    Views
    972

    Re: no reply???HELLLPPPP

    um why not store the returned answer from calctotime into a variable and reuse it?

    such as:

    int foo = calctottime( t1,t2,t3);

    then calling the function with the variable:

    calcmins(foo);...
Results 1 to 23 of 23