x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Cannot Include Iostream

Hello, When I try to include iostream in my Hero.h header, I get a series of errors, including not finding the directive and some UCLASS() errors. Hero.h // Fill out your copyright notice in the Description page of Project Settings.

 #pragma once
 
 #include <iosteam>
 
 #include "GameFramework/Pawn.h"
 #include "Hero.generated.h"
 
 UCLASS()
 class MOBA_API AHero : public APawn
 {
     GENERATED_BODY()
 
 public:
     // Sets default values for this pawn's properties
     AHero();
 
     // Called when the game starts or when spawned
     virtual void BeginPlay() override;
     
     // Called every frame
     virtual void Tick( float DeltaSeconds ) override;
 
     // Called to bind functionality to input
     virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
     
 private:
     float _health;
     float _mana;
 
     bool _alive;
 
     std::vector<FVector> _waypoints;
 };
 

also, everything runs extremely slowly, and I have to wait 15 seconds before i see any errors.....

Product Version: UE 4.14
Tags:
more ▼

asked Jan 12 '17 at 10:01 PM in C++ Programming

avatar image

iNorth
1 2 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Is this a copy+paste of your code? Your #include iostream is missing the R.

Also, you'll need to #include vector to use std::vector, though really you should use TArray, which is UE4's dynamic array.

Apparently I can't include angle brackets in these posts, make sure the iostream and vector includes have them.

more ▼

answered Jan 12 '17 at 10:38 PM

avatar image

jonathan.madden
169 8 8 14

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question