0

what is causing this error while im compiling ?


struct [[eosio::table]] requestForLoan{
      uint64_t req_id;
      name borr_name;
      uint64_t borr_id;
      name uwr_name;
      uint64_t uwr_id;
      double loan_amount;
      double interest_rate;
      uint64_t loan_duration;
      bool approvalStatus=false;
      uint64_t primary_key() const {
      return req_id;
      }
      auto get_borrower() const{
      return borr_name.value;
      }
    };

typedef eosio::multi_index <"requestLoan"_n,requestForLoan>requestLoan;
requestLoan reqLoan_table;```


 **error: non-type template argument is not a constant expression
    typedef eosio::multi_index <"requestLoan"_n,requestForLoan_info> requestLoan;**
                                ^~~~~~~~~~~~~~~





1 Answer 1

2

"requestLoan" isn't a valid name for an EOSIO table; it only supports lower-case names using alpha characters.

https://developers.eos.io/eosio-cpp/docs/naming-conventions#section-table-names-structs-functions-classes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.