std::string Candies::loadName(int i)
{
ifstream file;
file.open(name_addTXT[i].c_str());
file >> name;
file.close();
Type: Posts; User: Meerul264
std::string Candies::loadName(int i)
{
ifstream file;
file.open(name_addTXT[i].c_str());
file >> name;
file.close();
#ifndef CANDIES_H
#define CANDIES_H
#include <iostream>
#include <fstream>
#include <Global.h>
Thanks guys
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...
I guess I'll just have to put another parameter to all functions and make it work.
then how?? I still have no clue..
#include "Shapes.h"
#include "Global.h"
#include <iostream>
#include <SFML/Graphics.hpp>
Shapes::Shapes()
{
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...
#include "Security.h"
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
Ohh nvm got it now.
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...
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.
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...
Thanks :)
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.
This is what I'm talking about:
When facing down:
12428
When facing left:
12429
When facing right:
12430
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...
I see.. thanks for clearing that up.
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...
" 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...
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...
If you wouldn't mind I'd like to see an example.
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>
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>...
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...