I'm trying to run example from https://truffleframework.com/tutorials/pet-shop, but when I run truffle compile I get error saying
Error parsing C:/WINDOWS/system32/TruffleTest/pet-shop-tutorial/contracts/Adoption.sol: ParsedContract.sol:1:1: ParserError: Expected pragma, import directive or contract/interface/library definition. �p r a g m a s o l i d i t y ^ 0 . 5 . 0 ;
pragma solidity ^0.5.0;
contract Adoption {
address[16] public adopters;
// Adopting a pet
function adopt(uint petId) public returns (uint) {
require(petId >= 0 && petId <= 15);
adopters[petId] = msg.sender;
return petId;
}
function getAdopters() public view returns (address[16] memory){
return adopters;
}
}
Remix shows no problems at all, but VS code underlines line with require asking to provide error message but it doesn't seem to be an error becasue it gives same error even if comment it out.
Thank you for any thoughts on that.