• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ printout函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中printout函数的典型用法代码示例。如果您正苦于以下问题:C++ printout函数的具体用法?C++ printout怎么用?C++ printout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了printout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main()

{
    char matx1[4][4] = {{'-','-','-','-'}, {'-','o','-','-'}, {'o','o','o','-'}, {'-','-','-','-'}};
    char matx2[4][4] = {{'-','-','-','-'}, {'-','o','o','-'}, {'o','o','-','-'}, {'-','-','-','-'}};
    char matx3[4][4] = {{'-','-','-','-'}, {'-','o','-','-'}, {'-','o','-','-'}, {'-','o','o','-'}};
    char matx4[4][4] = {{'-','-','o','-'}, {'-','-','o','-'}, {'-','-','o','-'}, {'-','-','o','-'}};

    printout(matx1, matx2, matx3, matx4);
    rotation(matx1);
    rotation(matx2);
    rotation(matx3);
    rotation(matx4);
    printout(matx1, matx2, matx3, matx4);
    rotation(matx1);
    rotation(matx2);
    rotation(matx3);
    rotation(matx4);
    printout(matx1, matx2, matx3, matx4);
    rotation(matx1);
    rotation(matx2);
    rotation(matx3);
    rotation(matx4);
    printout(matx1, matx2, matx3, matx4);
    rotation(matx1);
    rotation(matx2);
    rotation(matx3);
    rotation(matx4);
    printout();

    return 0;

}
开发者ID:progslides,项目名称:progslides.github.io,代码行数:33,代码来源:hw4_2.c


示例2: print_model

void print_model (model *mod) {

    int i, j;

    printout("Dependent variable: %s\n", mod->dvname);
    printlog(VERBOSE, "\tAt position: %d\n", mod->dv);
    printout("Number of independent variables: %d\n", mod->numiv);
    printlog(VERBOSE, "Space allocated for independent variable array: %d\n", mod->maxiv);
    for (i = 0; i < mod->numiv; i++) {
        printout("Effect %d: %s", 1+i, mod->ivnames[i]);
        if (mod->direct[i] == 1)
            printout(" (DIRECT)\n");
        else
            printout("\n");
        printlog(VERBOSE, "\tAt position: %d\n", mod->iv[i]);
    }

    printout("Number of interactions: %d\n", mod->numints);
    printlog(VERBOSE, "Space allocated for interactions: %d\n", mod->maxints);
    for (i = 0; i < mod->numints; i++) {
        printout("Interaction %d: %s, %d terms [", 1+i, mod->intnames[i], mod->inttc[i]);
        for (j = 0; j < mod->inttc[i]; j++) {
            printout("%d", mod->ints[i][j]);
            if (j < mod->inttc[i] - 1)
                printout(", ");
            else
                printout("]\n");
        }
    }

}
开发者ID:faisal-w,项目名称:mlelr,代码行数:31,代码来源:model.c


示例3: printout

void printout(box * tree) {
    if((tree) != NULL) {
        printout(tree -> l);
        printf("%d",tree -> d);
        printout(tree -> r);
    }
}
开发者ID:rahnis,项目名称:C-Codes,代码行数:7,代码来源:treeInsertion.cpp


示例4: _create_object

 template <typename TYPE> TYPE* _create_object(Geant4Kernel& kernel, const TypeName& typ)    {
   Geant4Context* ctxt = kernel.workerContext();
   Geant4Action* object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
   if (!object && typ.first == typ.second) {
     string _t = typeName(typeid(TYPE));
     printout(DEBUG, "Geant4Handle", "Object factory for %s not found. Try out %s",
              typ.second.c_str(), _t.c_str());
     object = PluginService::Create<Geant4Action*>(_t, ctxt, typ.second);
     if (!object) {
       size_t idx = _t.rfind(':');
       if (idx != string::npos)
         _t = string(_t.substr(idx + 1));
       printout(DEBUG, "Geant4Handle", "Try out object factory for %s",_t.c_str());
       object = PluginService::Create<Geant4Action*>(_t, ctxt, typ.second);
     }
   }
   if (object)  {
     TYPE* ptr = dynamic_cast<TYPE*>(object);
     if (ptr)  {
       return ptr;
     }
     except("Geant4Handle", "Failed to convert object of type %s to handle of type %s!",
            typ.first.c_str(),typ.second.c_str());
   }
   except("Geant4Handle", "Failed to create object of type %s!", typ.first.c_str());
   return 0;
 }
开发者ID:AIDASoft,项目名称:DD4hep,代码行数:27,代码来源:Geant4Handle.cpp


示例5: printout

void printout(node *Tree) {

    printf("Root = %d\n",Tree->val);
    if(Tree->right){
        printf("Right: ");
        printout(Tree->right);
    }
    if(Tree->left){
        printf("Left: ");
        printout(Tree->left);
    }
}
开发者ID:quintonpryce,项目名称:2ndYear,代码行数:12,代码来源:q1Functions.c


示例6: tracenumber

void tracenumber( tsd_t *TSD, const num_descr *num, char type )
{
   char tmpch;
   streng *message,*tmpstr;
   tra_tsd_t *tt;
   num_descr nd;
   int indent;

   tmpch = TSD->currlevel->tracestat;
   if ( ( tmpch != 'I' ) && ( tmpch != 'R' ) )
      return;

   tt = (tra_tsd_t *)TSD->tra_tsd;
   if ( tt->traceflag || tt->quiet )
      return;

   memset( &nd, 0, sizeof( num_descr ) );
   descr_copy( TSD, num, &nd );
   tmpstr = str_norm( TSD, &nd, NULL );
   indent = TSD->systeminfo->cstackcnt + TSD->systeminfo->ctrlcounter;
   message = Str_makeTSD( 30 + indent + tmpstr->len );
   sprintf( tt->tracestr, "       >%%c> %%%ds  \"%%.%ds\"",
                          indent, tmpstr->len );
   message->len = sprintf( message->value, tt->tracestr,
                                           type, "", tmpstr->value );
   printout( TSD, message );
   if ( nd.num != NULL )
      FreeTSD( nd.num );
   Free_stringTSD( message );
   Free_stringTSD( tmpstr );
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:31,代码来源:tracing.c


示例7: GetParent

void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
{
    SCH_EDIT_FRAME* parent = GetParent();

    GetPrintOptions();

    wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
    printDialogData.SetMaxPage( g_RootSheet->CountSheets() );

    if( g_RootSheet->CountSheets() > 1 )
        printDialogData.EnablePageNumbers( true );

    wxPrinter printer( &printDialogData );
    SCH_PRINTOUT printout( parent, _( "Print Schematic" ) );

    if( !printer.Print( this, &printout, true ) )
    {
        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
            wxMessageBox( _( "An error occurred attempting to print the schematic." ),
                          _( "Printing" ), wxOK );
    }
    else
    {
        parent->GetPageSetupData() = printer.GetPrintDialogData().GetPrintData();
    }
}
开发者ID:reportingsjr,项目名称:kicad-source-mirror,代码行数:26,代码来源:dialog_print_using_printer.cpp


示例8: SetPrintParameters

void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
{
    SetPrintParameters( );

    // If no layer selected, we have no plot. prompt user if it happens
    // because he could think there is a bug in Pcbnew:
    if( s_Parameters.m_PrintMaskLayer == 0 )
    {
        DisplayError( this, _( "No layer selected" ) );
        return;
    }

    wxPrintDialogData printDialogData( *s_PrintData );

    wxPrinter         printer( &printDialogData );

    wxString          title = _( "Print" );
    BOARD_PRINTOUT_CONTROLLER      printout( s_Parameters, m_parent, title );

    if( !printer.Print( this, &printout, true ) )
    {
        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
            DisplayError( this, _( "There was a problem printing" ) );
        return;
    }
    else
    {
        *s_PrintData = printer.GetPrintDialogData().GetPrintData();
    }
}
开发者ID:morio,项目名称:kicad-source-mirror,代码行数:30,代码来源:dialog_print_using_printer.cpp


示例9: tracevalue

void tracevalue( tsd_t *TSD, const streng *str, char type )
{
   char tmpch;
   streng *message;
   tra_tsd_t *tt;
   int indent;

   /*
    * ANSI 8.3.17 requires placeholders in PARSE to be traced with TRACE R
    */
   tmpch = TSD->currlevel->tracestat;
   if ( ( tmpch != 'I' ) && ( tmpch != 'R' ) )
      return;

   tt = (tra_tsd_t *)TSD->tra_tsd;
   if ( tt->traceflag || tt->quiet )
      return;

   indent = TSD->systeminfo->cstackcnt + TSD->systeminfo->ctrlcounter;
   message = Str_makeTSD( str->len + 30 + indent );
   sprintf( tt->tracestr, "       >%%c> %%%ds  \"%%.%ds\"",
                          indent, str->len );
   message->len = sprintf( message->value, tt->tracestr,
                                           type, "", str->value );
   printout( TSD, message );
   Free_stringTSD( message );
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:27,代码来源:tracing.c


示例10: printDialogData

void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
{
    if( !PreparePrintPrms() )
        return;

    wxPrintDialogData printDialogData( *s_printData );

    wxPrinter printer( &printDialogData );
    wxString title = _( "Print" );
    BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title );

    // Disable 'Print' button to prevent issuing another print
    // command before the previous one is finished (causes problems on Windows)
    ENABLER printBtnDisable( *m_buttonPrint, false );

    if( !printer.Print( this, &printout, true ) )
    {
        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
            DisplayError( this, _( "There was a problem printing" ) );
    }
    else
    {
        *s_printData = printer.GetPrintDialogData().GetPrintData();
    }
}
开发者ID:zhihuitech,项目名称:kicad-source-mirror,代码行数:25,代码来源:dialog_print_using_printer.cpp


示例11: GetParent

bool DIALOG_PRINT_USING_PRINTER::TransferDataFromWindow()
{
    SCH_EDIT_FRAME* parent = GetParent();

    GetPrintOptions();

    wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
    printDialogData.SetMaxPage( g_RootSheet->CountSheets() );

    if( g_RootSheet->CountSheets() > 1 )
        printDialogData.EnablePageNumbers( true );

    wxPrinter printer( &printDialogData );
    SCH_PRINTOUT printout( parent, _( "Print Schematic" ) );

    // Disable 'Print' button to prevent issuing another print
    // command before the previous one is finished (causes problems on Windows)
    m_sdbSizer1OK->Enable( false );

    if( !printer.Print( this, &printout, true ) )
    {
        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
            wxMessageBox( _( "An error occurred attempting to print the schematic." ),
                          _( "Printing" ), wxOK );
    }
    else
    {
        parent->GetPageSetupData() = printer.GetPrintDialogData().GetPrintData();
    }

    return true;
}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:32,代码来源:dialog_print_using_printer.cpp


示例12: main

int main (void)
{
    FILE *fin, *fout, *fdict;
    char str[MAXCHAR + 1];
    Name cow[MAXN];
    int count, index;
    long long serial;

    fin = fopen("namenum.in", "r");
    fout = fopen("namenum.out", "w");
    fdict = fopen("dict.txt", "r");

    count = 0;
    while (fscanf(fdict, "%s", str) != EOF) {
        if (screen(str))
            continue;
        copy(&cow[count++], str);
        sort(cow, count);
    }

    fscanf(fin, "%lld", &serial);

    if ((index = find(serial, cow, count)) > -1)
        printout(fout, index, cow, count);
    else
        fprintf(fout, "NONE\n");

    return 0;
}
开发者ID:mythnc,项目名称:online-judge-solved-lists,代码行数:29,代码来源:namenum.c


示例13: printDialogData

void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
{
    PCB_PLOT_PARAMS plot_opts = m_parent->GetPlotSettings();

    s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
    s_Parameters.m_PrintScale = s_scaleList[m_ScaleOption->GetSelection()];

    plot_opts.SetFineScaleAdjustX( s_Parameters.m_XScaleAdjust );
    plot_opts.SetFineScaleAdjustY( s_Parameters.m_YScaleAdjust );
    plot_opts.SetScale( s_Parameters.m_PrintScale );

    m_parent->SetPlotSettings( plot_opts );

    wxPrintDialogData printDialogData( *s_PrintData );
    wxPrinter         printer( &printDialogData );

    BOARD_PRINTOUT_CONTROLLER      printout( s_Parameters, m_parent, _( "Print Footprint" ) );

    if( !printer.Print( this, &printout, true ) )
    {
        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
            DisplayError( this, _( "There was a problem printing." ) );

        return;
    }
    else
    {
        *s_PrintData = printer.GetPrintDialogData().GetPrintData();
    }
}
开发者ID:RyuKojiro,项目名称:kicad-source-mirror,代码行数:30,代码来源:dialog_print_for_modedit.cpp


示例14: run_tests

void run_tests(bool empty, uint64_t num, T a1){
    uint64_t i = 0;
    double ot = timer_overhead(num);
    string message;
    vector<double> time;
    Vector packages;
    hpx::naming::id_type lid = hpx::find_here();

    create_packages<Vector, Package>(packages, num);

    //next test applies actions directly, skipping get_gid stage
    high_resolution_timer tt;
    for(i = 0; i < num; ++i)
        hpx::apply<Action>(lid, a1);
    double mean = tt.elapsed()/num;
    time.reserve(num);
    message = "Measuring time required to apply actions directly:";
    for(i = 0; i < num; i++){
        high_resolution_timer t1;
        hpx::apply<Action>(lid, a1);
        time.push_back(t1.elapsed());
    }
    printout(time, ot, mean, message);
 
}
开发者ID:vamatya,项目名称:hpx_benchmarks,代码行数:25,代码来源:general_apply_dir_analysis.cpp


示例15: WXUNUSED

void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event))
{
    wxPostScriptPrinter printer(g_printData);
    MyPrintout printout(_T("My printout"));
    printer.Print(this, &printout, true/*prompt*/);

    (*g_printData) = printer.GetPrintData();
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:8,代码来源:printing.cpp


示例16: delta

void Network::train(vector<float> x,int ident,float beta)
{
    vector<vector<float> > y;
    vector<vector<float> > dy;

    vector<float> answer=x;

    vector<vector<float> > delta(layers.size(),vector<float>());

    deque<Layer>::iterator i;
    for (i = layers.begin(); i != layers.end(); ++i)
    {
        dy.push_back((*i).get_dy(answer));
        answer=(*i).classify(answer);
        y.push_back(answer);
    }

    vector<float> d(x.size(),-1.0f);
    d[ident] = 1.0f;

    //output layer
    for (int j = 0; j < y.back().size(); ++j)
        delta.back().push_back((d[j]-y.back()[j])*dy.back()[j]);


    //hidden layers
    for (int k=layers.size()-1;k>=0;--k)
        for (int j=0;j<y[k].size();++j) {
            float sum=0.0;
            for (int l=0;l<layers[k+1].size();++l)
            {
                sum+=delta[k+1][l]*layers[k+1].get_weight(l,j);
            }
            delta[k].push_back(sum*dy[k][j]);
        }

	cout<<"DELTA"<<endl;
	for (vector<vector<float> >::iterator i=delta.begin();i!=delta.end();++i)
	{
		for (vector<float>::iterator j=(*i).begin();j!=(*i).end();++j)
			cout<<(*j)<<" ";
		cout<<endl;
	}

    //correction
    for (int k=1;k<layers.size();++k)
        for (int n=0;n<layers[k].size();++n)
        {
            vector<float> mod;
            for (int l=0;l<layers[k-1].size();++l)
                mod.push_back(beta*delta[k][n]*y[k-1][l]);

            mod.push_back(beta*delta[k][n]);
            layers[k].modify(n,mod);
        }
    printout();
}
开发者ID:piotrdubiel,项目名称:scribeapp,代码行数:57,代码来源:Network.cpp


示例17: printout

Network::Network(vector<int> arch)
{
	for (unsigned int i=1; i < arch.size(); ++i)
	{
        layers.push_back(Layer(arch[i],arch[i-1]));
	}
	
	printout();
}
开发者ID:piotrdubiel,项目名称:scribeapp,代码行数:9,代码来源:Network.cpp


示例18: main

int main(void) {

    printout();

    bool dobreak = false;
    char response;
    double r = 0;

    for (;!dobreak;) {
        response = 'a';
        int dimensions = promptdimensions();
        switch (dimensions) {
            case 2:
                // Get parameters
                while( r <= 0.0 ) {
                    printf("Please give a length: ");
                    scanf("%lf", &r);
                }
                circle(r);
                square(r);
                break;

            case 3:
                // Get parameters
                while( r <= 0.0 ) {
                    printf("Please give a length: ");
                    scanf("%lf", &r);
                }
                sphere(r);
                cube(r);
                break;

            default:
                break;
        }


        for(;;) {
            printf("Do you want to do this again? (y/n)\n");
            scanf(" %c", &response);
            if (response == 'y' ||  response == 'Y') {
                printf("Restarting\n");
                break;
            }
            else if (response == 'N' || response == 'n') {
                printf("Quitting\n");
                dobreak = true;
                break;
            }
            else {
                printf("That is not an acceptable response\n");
            }
        }
    }

    return 0;
}
开发者ID:ben-albrecht,项目名称:eg,代码行数:57,代码来源:hw14.c


示例19: printout

uint32_t Register_GPIO_BRR::operator = (uint32_t arg) {
    printout("=", 0);

    uint32_t value = odr_.value_;
    value &= ~(arg & 0xffff);
    odr_.assign(value);

    return 0; // See STM32F0xx Refence Manual RM0091 Doc ID 018940 Rev 5 page 165.
}
开发者ID:ElPopularVale,项目名称:Runtime,代码行数:9,代码来源:Register_GPIO_BRR.cpp


示例20: printout

void eErrorOutput::thread_finished()
{
	threadrunning=false;
	printout_timer->stop();
	printout();

	while(waitPrintout)
		usleep(10000); // wait 10 milliseconds
}
开发者ID:Adga52,项目名称:enigma2,代码行数:9,代码来源:eerroroutput.cpp



注:本文中的printout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ prints函数代码示例发布时间:2022-05-30
下一篇:
C++ printmsg函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap