C++ / Documentation search
Find the error. Find the next step.
Search by diagnostic code, copied message, or symptom. Filter by content and project system.
205 results
Browse documentation →C4244: The conversion is intended.
Make it explicit with static_cast<int>(value) , and round first when truncation is not what you want: std::lround(value) .
C4244: The destination type is too small.
Use a type that holds the value, for example double for a result that has a fractional part, or int64_t for a large count.
C4267: A size or an index is stored in int .
Use size_t , or auto : for (size_t i = 0; i < items.size(); ++i) , or a range-based for .
C4267: An API needs an int or a DWORD .
Check that the size fits, then cast explicitly: static_cast<int>(text.size()) .
C4430: A function has no return type.
Write it, for example void or int : C++ has no default int .
C4430: The type is in a namespace.
Qualify it, for example std::string .
C4430: The type is not declared yet.
Include the header that declares it, before the line that uses it.
C4430: Two headers include each other.
With a circular include, one class is not declared when the other uses it. Replace the include with a forward declaration ( class Widget; ) where a pointer or a reference is enough.
C4996: A POSIX name is used.
Functions such as open or strdup have ISO C++ names with an underscore: _open , _strdup .
C4996: A string function can overflow its buffer.
Prefer std::string , or the bounded functions such as strcpy_s and snprintf .
C4996: Portable code must keep the standard functions.
Define _CRT_SECURE_NO_WARNINGS in the project's preprocessor definitions, for that project only, rather than disabling C4996 for everything: it also reports your own [[deprecated]] functions.
Check your build settings: Each finding points to the line to change
Findings name the property, the configuration, and the file and line where it is set, a property sheet included. The AI reviews and explains each one, and Fix review findings can correct the project files after your approval. The analysis…
Check your build settings: Settings checked
Inconsistent: static libraries linked with another runtime library ( LNK2038 ), a Release configuration that builds a Debug project, different toolsets or C++ standards, two projects sharing an intermediate directory or writing the same…
Debug with the AI: Breakpoints and stepping, with your approval
The AI lists the breakpoints and sets or removes one, with an optional condition. It continues, steps over, into, or out of a function, or breaks into the running program, then sees where it stopped. Each of these actions waits for your…
Debug with the AI: Read values while paused
The AI evaluates a variable, a member, an array element, or a comparison in the current frame or a caller's, with its members. Expressions that could change the program, such as assignments or function calls, are refused.
Explain crashes and dumps with AI: From a crash dump
Choose Extensions > CppPilot > Analyze Crash Dump... , pick the .dmp file and the folders that contain the program's .pdb files. CppPilot opens the dump in the native debugger with these symbols and explains the crash from the recorded…
Explain crashes and dumps with AI: When the debugger breaks
When Visual Studio breaks on a native exception, an assertion, or a debug break, CppPilot offers an analysis in a notification that does not interrupt you. It captures a bounded snapshot of the active location, the call stack, the…
Fix build errors with AI: Project context sent to the AI
Linker errors often come from settings, not code. CppPilot gives the AI the include directories, preprocessor definitions, C++ standard, runtime library, and linked libraries of the project, as Visual Studio evaluates them for the active…
Fix build errors with AI: Request fixes and check the result
Fix all errors asks the AI to work through the errors in several passes. After each fix, CppPilot rebuilds the C++ project concerned and follows every error through its states: ready, correcting, verifying, resolved, or still present. A fix…
LNK1104: The file is the program itself, and it is still running.
When the message names your .exe or .dll , close the running program or stop debugging; an antivirus scanning the file can also lock it briefly.