Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m working in C++ using codeblocks compiler. Can anybody help me with a compil

ID: 3853533 • Letter: I

Question

I'm working in C++ using codeblocks compiler. Can anybody help me with a compiler error on line 5 in the implementation file in hash.cpp It reads: expected constructor, destructor of conversion type before ; token. I'll include screen shoots of the header file and implementation file.

//Header file

Implementation file

ble Test Codc:Blocks 101 earch Preject Build Debug rertran wxSmith Tols Teols+Plugins DexyBloks 5ettings Help malr.cop hach.cpp "hash.hx 5 using nanespace std 7 claaa hashClass public 10 11 hesiclass int Hash (string key) 13 14 15 private 16 17 1 19 20 21tendit int tablesize Lags & athers top schoonsummer 201 0SE 2383 -Data Structures PTojects Hashlable Hashlable_Test hash h Windows ICR L detault Line 11, Column 14 verwnte Modified Read/Wnte detaut OType here to search 11:35 PM 1/2017

Explanation / Answer

Its the minute errors that cause compile time errors in thee program.

Here in your Hash.cpp file you have coded in line5

hashClass::Hash();

{

tablesize=100;

}

as you are defining a constructor you should not use the semicolon after Hash() it is done when we are only declaring the Constructor

the correction should be-

hashClass::Hash()

{

tablesize=100;

}

after removing the semicolon i guess the program will work without any errors.