set head to NULL (‘NULL’ : undeclared identifier)

As written, NULL isn’t defined in your program. Usually, that’s defined in a standard header file — specifically <cstddef> or <stddef.h>. Since you’re restricted to iostream, if yours doesn’t get NULL implicitly from that header, you can use 0 or, in C++11, nullptr, which is a keyword and doesn’t require a header. (It is not recommended to define NULL yourself. It might work sometimes, but it is technically … Read more

Download c++ in existing visual studio 2017

1.Go to Control panel 2.In the Add or Remove Programs dialog box, select the product you want to repair and then click Change/Remove 3.In the Setup wizard, click Next 4.Click Repair 5.Then Modify it by selecting C++ to add it. Note : This work in Window OS only

Digit limitation from decimal point in C++

Are you actually trying to round the number, or just change its displayed precision? For the former (truncating the extra digits): or (rounding up/down as appropriate, per jheriko’s answer) For the latter: where the parameter to setprecision() is the maximum number of digits to show after the decimal point.

Operator Overloading C++; too many parameters for << operation

You are overloading << operator as a member function, therefore, the first parameter is implicitly the calling object. You should either overload it as friend function or as a free function. For example: overloading as friend function. However, the canonical way is to overload it as free function. You can find very good information from this post: C++ operator overloading

Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file

I think you are confused about how the compiler puts things together. When you use -c flag, i.e. no linking is done, the input is C++ code, and the output is object code. The .o files thus don’t mix with -c, and compiler warns you about that. Symbols from object file are not moved to other object files like that. All object … Read more

enum to string in modern C++11 / C++14 / C++17 and future C++20

Magic Enum header-only library provides static reflection for enums (to string, from string, iteration) for C++17. For more examples check home repository https://github.com/Neargye/magic_enum. Where is the drawback? This library uses a compiler-specific hack (based on __PRETTY_FUNCTION__ / __FUNCSIG__), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 9. Enum value must be in range [MAGIC_ENUM_RANGE_MIN, MAGIC_ENUM_RANGE_MAX]. By default MAGIC_ENUM_RANGE_MIN … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)