Search:

Type: Posts; User: Labmouse

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,677

    thx all....and ghetto smurf is my real name :)

    thx all....and ghetto smurf is my real name :)
  2. Replies
    7
    Views
    1,677

    thx will try that ...seems alot less complex.No...

    thx will try that ...seems alot less complex.No it doesnt mention what the external that is undefined(i think it normally does with varibles).
  3. Replies
    7
    Views
    1,677

    Tried that and still showing the same error...

    Tried that and still showing the same error message.I have Double checked the code and its copied verbatim as far as i can tell..
  4. Replies
    7
    Views
    1,677

    QSORT --and undefined external

    hi,
    Im starting to read up on arrays.I copied some code and when i try to compile it I keep getting:

    C:\Users\ghetto smurf\Documents\Visual Studio 2008\Projects\Array\Debug\Array.exe : fatal...
  5. Replies
    6
    Views
    1,128

    makes sense now.Thanks again

    makes sense now.Thanks again
  6. Replies
    6
    Views
    1,128

    thanx elysia that worked. So You only use '&' in...

    thanx elysia that worked.
    So You only use '&' in the function prototype/definition and not actually when u make the function call
  7. Replies
    6
    Views
    1,128

    Functions &passing parameters by reference

    Hi,

    how do u write a prototype of a function that passes by reference


    //function definition

    int playerLoss(int &playerMoney)
    {
    int x=45;
  8. Replies
    14
    Views
    2,048

    Thanks...in hindsight making a function that...

    Thanks...in hindsight making a function that returns 1 random number and then calling it 4 times is fairly goddamm obvious!!
  9. Replies
    5
    Views
    1,144

    done as you said salem and the prog is working...

    done as you said salem and the prog is working fine.thanks.

    As a rule of thumb in header files i should only:

    1)only declare varibles if they are global,not initialise them
    2)only insert...
  10. Replies
    5
    Views
    1,144

    so i should have a paladin.h file where i should...

    so i should have a paladin.h file where i should just declare:


    int paladinHealth;


    and then in paladin.cpp i should :


    #include"paladin.h"
  11. Replies
    5
    Views
    1,144

    varible initiliazation error's

    hi ,

    have iniatilised some varibles in a seperate header fill so that they are global,but when i go to change them in main() i keep getting errors.
    here's the header file:


    #ifndef...
  12. Replies
    14
    Views
    2,048

    Ah ok so just function prototypes in the header...

    Ah ok so just function prototypes in the header file.So it will only return one varible.Haved learnt the use of pointers or structures yet so that path is a no go at the moment

    Thanks all
  13. Replies
    14
    Views
    2,048

    heres my header file #ifndef myfunctions_h...

    heres my header file



    #ifndef myfunctions_h
    #define myfunctions_h



    int randomNumbers()
  14. Replies
    14
    Views
    2,048

    Didnt include in the header file but...

    Didnt include <iostream> in the header file but have in main().And also used cin.get() after the 4 couts in main.And also using namespace std in main.
  15. Replies
    14
    Views
    2,048

    only started C++ recently and am only reading up...

    only started C++ recently and am only reading up on pointers at the moment so that's beyond me at the oment but thanks anyway

    Labmouse
  16. Replies
    14
    Views
    2,048

    Funcions-can they return more than 1 value?

    Hi,

    Just practising making my own header files and functions.I have created a function that generates 4 different varibles.I have set the function to return all 4.It compiles fine but when i call...
  17. Replies
    8
    Views
    6,809

    dev-C++ or code::blocks?

    I have being using Dev-C++ but have beeb told that code::Blocks is better.Should i switch?Is it ok to have the 2 IDE's on 1 pc?

    Im happy enough using Dev-C++ but again i only have a basic...
  18. Replies
    6
    Views
    1,775

    Thanks was using #include ...

    Thanks was using


    #include<myfunctions.h>


    and not


    #include "myfunctions.h"
  19. Replies
    6
    Views
    1,775

    Devc++ and header files

    Hi i created my first header file but cant fathom out how to use it.I have saved it as .h file extension and its in the folder where all my source files are saved.Any tips?

    heres the header file...
  20. Replies
    6
    Views
    2,227

    Thanks will try the function as it could be used...

    Thanks will try the function as it could be used across the board,only just started reading up on functions and prototypes but will give it a go
  21. Replies
    6
    Views
    2,227

    Random number generator

    Hi,

    Is there a quicker way of doing this bit of code.want to roll 5x ten sided dice and add the results.The way i have done it looks nasty,


    int playerHealth=( (rand ()%10)+1)+( (rand...
  22. Replies
    6
    Views
    1,378

    Yep Twomer put in the cin.ignore at the offending...

    Yep Twomer put in the cin.ignore at the offending parts and it works fine.Im just curios why it works without cin.ignore for the 1st few questions and then starts acting quirky..
  23. Replies
    6
    Views
    1,378

    works fine down as far as 'your favourite...

    works fine down as far as 'your favourite number',then prints the next 2 questions,then waits for user input and then prints out the next 2 questions.Will try and put in cin.ignore at the offending...
  24. Replies
    6
    Views
    1,378

    code acting a bit strange

    Hi,
    just doing a simple progamme for my younger brother(a funny news spread).The programme asks for his name,favourite simpsons character and the like but halve way thru the code it starts out...
  25. Replies
    2
    Views
    1,099

    Thanks Bench,was working out of a book but lost...

    Thanks Bench,was working out of a book but lost it(dont ask!)and couldnt find the command on the internet,

    Labmouse
Results 1 to 25 of 26
Page 1 of 2 1 2