Search:

Type: Posts; User: Meerul264

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. std::string Candies::loadName(int i) { ...

    std::string Candies::loadName(int i)
    {
    ifstream file;


    file.open(name_addTXT[i].c_str());
    file >> name;


    file.close();
  2. Share values between functions in same class?

    #ifndef CANDIES_H
    #define CANDIES_H


    #include <iostream>
    #include <fstream>
    #include <Global.h>
  3. Replies
    5
    Views
    1,016

    Thanks guys

    Thanks guys
  4. Replies
    5
    Views
    1,016

    Need someone to criticize my codes.

    Please find any fault in my codes. No errors, everything works like how I wanted it to be, but I don't have real teachers to scold me for not doing what real programmer supposed to do so please look...
  5. I guess I'll just have to put another parameter...

    I guess I'll just have to put another parameter to all functions and make it work.
  6. then how?? I still have no clue..

    then how?? I still have no clue..
  7. How to you use values from other function in the same class?

    #include "Shapes.h"
    #include "Global.h"


    #include <iostream>
    #include <SFML/Graphics.hpp>


    Shapes::Shapes()
    {
  8. Replies
    7
    Views
    1,109

    Thanks. One more question; I'm having problem...

    Thanks. One more question; I'm having problem with making something like a "serial key". Something like just simply storing strings somewhere in the code and then use if statement to check valid...
  9. Replies
    7
    Views
    1,109

    Help me with this weird error please

    #include "Security.h"


    #include <iostream>
    #include <SFML/Graphics.hpp>
    #include <SFML/Window.hpp>
  10. Replies
    1
    Views
    852

    Ohh nvm got it now.

    Ohh nvm got it now.
  11. Replies
    1
    Views
    852

    Question regarding

    Hello.

    When I was playing around and writing an array of strings into a file in a function of class A , and then in another class B, I read the file, storing their strings into another array of...
  12. Replies
    2
    Views
    6,445

    Camera.cpp line 45, that was careless of me. Now...

    Camera.cpp line 45, that was careless of me. Now I changed them to cameraX and cameraY from playerX to playerY respectively. But still I got the same problem.
  13. Replies
    2
    Views
    6,445

    [SFML C++] Help me with screen scrolling

    Hello. I've looked on screen scrolling and one of the way to do it is to use the sf::View::setViewport(sf::floatRect( left co-dt, top co-dt, rect width, rect height).

    But the problem now is that...
  14. Thanks :)

    Thanks :)
  15. I see.. thanks a lot. I thought it was supposed...

    I see.. thanks a lot. I thought it was supposed to be (x1, y1, x2, y2). Or was it only applied to setSubRect (the old ver 1.6 SFML)?
    And thanks for the simplification.. I didn't think it through.
  16. This is what I'm talking about: When facing...

    This is what I'm talking about:

    When facing down:
    12428

    When facing left:
    12429

    When facing right:
    12430
  17. [SFML C++] Sprite isn't cropped well for animation... that's the problem maybe.

    I'm not sure myself what has caused this problem. It seems to me that the code that I wrote was right. Even when I cropped it manually (without the getSize().x function to check the sprite's width...
  18. Replies
    4
    Views
    1,214

    I see.. thanks for clearing that up.

    I see.. thanks for clearing that up.
  19. Replies
    4
    Views
    1,214

    Understanding pointers

    I've read about pointers and watched some tutorials about it, but my understanding about is still shallow. To make up my mind I need to be clear my objective - what are the important terms that I...
  20. Replies
    7
    Views
    2,245

    " it does so only if the caller passes in a NULL...

    " it does so only if the caller passes in a
    NULL pointer for the last name."

    kind of contradicts with "if the caller passes in a null pointer, you don't prompt for the last name".

    Sorry if I...
  21. Replies
    7
    Views
    2,245

    The purpose of NULL pointer?

    1. Write a function that prompts the user to enter his or her first name and last name, as two separate
    values. This function should return both values to the caller via additional pointer (or...
  22. Replies
    16
    Views
    1,929

    If you wouldn't mind I'd like to see an example.

    If you wouldn't mind I'd like to see an example.
  23. Replies
    16
    Views
    1,929

    I don't know what default constructor is, never...

    I don't know what default constructor is, never heard of it. In which chapter is it? But anyway I just put it like this;




    #include <iostream>
    #include <cstdlib>
    #include <ctime>
  24. Replies
    16
    Views
    1,929

    Sorry what do you mean by using std::array? ...

    Sorry what do you mean by using std::array?

    Anyway, I change the code a little, but I don't know what's wrong. I'll post the compiler error along with the code.




    #include <iostream>...
  25. Replies
    16
    Views
    1,929

    Now I want to do the same thing as above, but...

    Now I want to do the same thing as above, but this time it is an array of space ship objects, instead of just one. Is it possible to pass them by reference and do the coding same as above, but now I...
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4