none
error function RRS feed

  • Question

  • what is it error function ? How can i call it . in what kind of library placed it ? i meet with this function and i do not know nothing about her .

    e.g : error("I think") .

    Saturday, December 7, 2019 12:45 AM

All replies

  • This is not a function from the standard library.  Where did you meet this function?
    Saturday, December 7, 2019 1:14 AM
  • what is it error function ? How can i call it . in what kind of library placed it ? i meet with this function and i do not know nothing about her .

    e.g : error("I think") .

    Are you asking about this CRT  function https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/perror-wperror?view=vs-2019
    Saturday, December 7, 2019 4:21 PM
  • //list 2//
    
    #include <iostream>
    #include <string>
    #include "c:/users/rb/moje dokumenty/Visual Studio 2005/przyklady/GUI/std_lib_facilities.h"
    using namespace std;
    
    int main()
    {
        int age;
    	cin>>age;
        
    	cout<<"Podobno miałeś urodziny i masz juz"<<age<<"lat";
    	if (age <0)
    	{
    		error("Chyba sobie żartujesz!");
    	}
    	if (age>110)
    	{
    		error("Chyba sobie żartujesz!");
    	}
    	system("pause");
    }

    Saturday, December 7, 2019 10:28 PM
  • #include "c:/users/rb/moje dokumenty/Visual Studio 2005/przyklady/GUI/std_lib_facilities.h"
    Look in this header, which seems to be sourced from a book "Programming: Principles and Practice using C++ (second edition)" by Stroustrup.  http://www.stroustrup.com/Programming/PPP2code/std_lib_facilities.h
    Sunday, December 8, 2019 1:05 AM
  • Hello,

    Thank you for posting in the MSDN forum.

    If your issue is solved, please "Mark as answer" or "Vote as helpful" post to the appropriate answer , so that it will help other members to find solution quickly if they faces similar issue.

    Best Regards,

    Suarez Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 9, 2019 1:14 AM
  • And, as a side note, it is very bad practice to use absolute pathnames in your #include statements.  You should just #include "std_lib_facilities.h", and then set your include paths so that the directory name is there.


    Tim Roberts | Driver MVP Emeritus | Providenza &amp; Boekelheide, Inc.

    Monday, December 9, 2019 7:24 AM