pragma solidity 0.8.13;
contract student {
string public value;
constructor() public {
value="sami";
}
function set(string memory _value) public {
value = _value;
}
function get() public view returns(string memory) {
return _value;
}
}
This is my code , it keeps giving me this error : declaration error undeclared identifier solidity , did u mean "value"? line ( return _value)
247 Views Asked by Serosh Butt At
1
There are 1 best solutions below
Related Questions in SOLIDITY
- Solidity based blockchain not getting account and networkId
- unexpected keyword or identifier .ts(1434)
- Gas estimation failed | Returned error: gas required exceeds allowance (16966)
- This is the solidity code to list nft in marketplace after minting but while calling makeItem function Error is showing that Faliled to estimate gas
- My question is regarding installation of a package in VS code but im getting an error in installing it
- unsupported addressable value (argument="target", value=null, code=INVALID_ARGUMENT, version=6.11.1
- Error when deploying contract using ethers v6
- Error when fetching pending voters from smart contract using ethers.js
- IERC20 token.transfer always fails when called from within smart contract
- Solidity: How can I get an array of owners of my ERC20 and make a smart contract that uses that without exceeding the gas limit?
- Solidity call pancakeswap v3 contract exception
- Merkle Tree that should handle both odd and even numbers of leaves
- Uniswap v3 flashloan remainging balance not correct after paying off the loan
- connecting trust wallet mobile to my dapp
- Solidity Smart Contract & Hedera Hashgraph Javascript SDK Integration
Related Questions in DECLARATION
- Can a tentative definition use the storage class specifier _Thread_local?
- In Haskell, what does `Con Int` mean?
- How to do declaration in Visual studio 2022 if Top level statement is enabled?
- Variable not defined error after defining variable in another function
- How to add a property in FastifyRequest's interface without overwriting everything in a declaration file
- Why is it possible to change the value of an integer indirectly via a pointer to a constant int?
- Class A declares Class B as a friend, but Class B has Class A as a member
- Vuetify preset Essentials cannot find module 'virtual:generated-layouts'
- Why can you use a typedef'd struct before the typedef?
- Is It Not Possible To Declare A Variable of Abstract Type In C++?
- How can I fix the variable declaration error?
- Can I declare an array of different length arrays in C without variable names?
- How to correctly declare function with templated class as return type in header?
- How to define a seperate implementation of a template class constructor
- C++ static variable declaration - difference between module vs function
Related Questions in REMIX
- Use Tailwind-Merge or Tailwind-Variants On Oxygen Runtime
- solidity get contract address issue
- The remix serve port is getting changed after changes in any file
- How to paste ETH price feeds as rate in my crowdsale.sol
- Metaobject updating with Shopify Matrix
- Deploy Shopify app on Alma Linux server using cpanel
- Remix solidity compiler is not compiling properly offline, why?
- React remix middleware and database connection
- Getting error when executing "addPrescription" function in solidity smart contract
- Remix defer() not working as expected with the most basic example. It awaits all promises before transmitting data
- Unable to connect to the test node by using External Http Provider in Remix
- Fetching coupons from Shopify
- No API request not called when closed tab restored
- useLoaderData not returning data from closest route
- React remix api route
Related Questions in UNDECLARED-IDENTIFIER
- JavaScript Map or 2D Array for...of Variable Declarations or Lack Thereof
- How can I fix IERC20 & IAccessControl interfaces causing 'Undeclared Identifier' error?
- expected identifier or '(' before 'while'gcc, Error to Add Identifier before a While
- Why isn't variable 'result' always declared?
- error 'symbol' undeclared (first use in this function)
- Solidity Compile error for adding _studentLastName object
- undeclared variable in a do-while loop in C
- Pinescript V5: Undeclared identifier 'strategy' error
- undeclared identifer of a wndproc function
- Undeclared identifier when overloading operator
- Pine Language - Undeclared Identifier Error
- How do I make Class A a member of Class B without inheriting it?
- Undeclared identifier with definition in header file
- First use in this function
- What's the problem with my code? In the third last line in score[i], the program said that i is undeclared
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You have undefined var in get() function "_value". MAy be you what return class var "value"?