本文整理汇总了C++中printOut函数的典型用法代码示例。如果您正苦于以下问题:C++ printOut函数的具体用法?C++ printOut怎么用?C++ printOut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printOut函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: printOut
// Recursively walks down an ownership tree of AsdkOwnerDemo
// class objects, printing out information on each one.
//
void
printOut(AcDbObjectId id)
{
AsdkOwnerDemo *pDemo;
acdbOpenObject((AcDbObject*&)pDemo, id, AcDb::kForRead);
acutPrintf("\nIntdata: %d ObjId: %ld Backpointer:"
" %ld OwnedObj: %ld", pDemo->intData(),
(pDemo->objectId()).asOldId(),
(pDemo->ownerId()).asOldId(),
(pDemo->idData()).asOldId());
// Recursive tree walk
//
if ((pDemo->idData()).asOldId() != 0L) {
printOut(pDemo->idData());
}
pDemo->close();
}
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:21,代码来源:ownrshp.cpp
示例2: traverse
// Recursively traverse an eZ Publish directory
static void traverse( const QDir &dir, Translator &fetchedTor, ConversionData cd, UpdateOptions options, bool *fail )
{
if ( options & Verbose )
printOut( QObject::tr( " Checking subdirectory '%1'" ).arg( qPrintable(dir.path()) ) );
if ( !dir.exists() )
return;
const QFileInfoList list = dir.entryInfoList();
QFileInfo fi;
for ( int i = 0; i < list.size(); ++i )
{
fi = list.at( i );
if ( fi.fileName().startsWith( "." ) )
{
// Do nothing
}
else if ( fi.isDir() )
{
QDir subdir = dir;
subdir.setCurrent( subdir.path() + QDir::separator() + fi.fileName() );
traverse( subdir.currentPath(), fetchedTor, cd, options, fail );
subdir.setCurrent( dir.path() );
}
else
{
if ( fi.fileName().endsWith(QLatin1String(".php"), Qt::CaseInsensitive) )
{
if ( options & Verbose )
printOut( QObject::tr( " Checking '%1'" ).arg( qPrintable(fi.fileName()) ) );
if ( !fetchedTor.load(fi.fileName(), cd, QLatin1String("php")) )
{
qWarning( "%s", qPrintable( cd.error() ) );
*fail = true;
}
}
else if ( fi.fileName().endsWith(QLatin1String(".tpl"), Qt::CaseInsensitive) )
{
if ( options & Verbose )
printOut( QObject::tr( " Checking '%1'" ).arg( qPrintable(fi.fileName()) ) );
if ( !fetchedTor.load(fi.fileName(), cd, QLatin1String("tpl")) )
{
qWarning( "%s", qPrintable( cd.error() ) );
*fail = true;
}
}
}
}
}
开发者ID:arisgates,项目名称:ez5tutorial,代码行数:50,代码来源:main.cpp
示例3: main
int main(void)
{
/* Sets are predefined per requirements */
int set_1[] = { 5, 1, 3 };
int size_1 = sizeof(set_1) / sizeof(set_1[0]);
int set_2[] = { 8, 5, -1, 3, 2 };
int size_2 = sizeof(set_2) / sizeof(set_2[0]);
int set_3[] = { 5, 4, 3, 2, 1 };
int size_3 = sizeof(set_3) / sizeof(set_3[0]);
int set_4[] = { 9 };
int size_4 = sizeof(set_4) / sizeof(set_4[0]);
printOut(set_1, size_1, set_2, size_2);
printOut(set_3, size_3, set_4, size_4);
}
开发者ID:rghamilton3,项目名称:c_programs,代码行数:15,代码来源:intersectionOfSets.c
示例4: printOut
NdbOut& operator<<(NdbOut& no, const PrepareOperationRecord& por) {
no << "-----------PREPARE OPERATION RECORD------------" << endl << endl;
printOut("Record type:", por.m_recordType);
printOut("logRecordSize:", por.m_logRecordSize);
printOut("hashValue:", por.m_hashValue);
switch (por.m_operationType) {
case 0:
ndbout_c("%-30s%-12u%-6s", "operationType:",
por.m_operationType, "read");
break;
case 1:
ndbout_c("%-30s%-12u%-6s", "operationType:",
por.m_operationType, "update");
break;
case 2:
ndbout_c("%-30s%-12u%-6s", "operationType:",
por.m_operationType, "insert");
break;
case 3:
ndbout_c("%-30s%-12u%-6s", "operationType:",
por.m_operationType, "delete");
break;
default:
printOut("operationType:", por.m_operationType);
}
printOut("page_no: ", por.m_page_no);
printOut("page_idx: ", por.m_page_idx);
printOut("attributeLength:", por.m_attributeLength);
printOut("keyLength:", por.m_keyLength);
#if 1
// Print keydata
Uint32* p = (Uint32*)&por.m_keyInfo;
for(Uint32 i=0; i < por.m_keyLength; i++){
printOut("keydata:", *p);
p++;
}
// Print attrdata
for(Uint32 i=0; i < por.m_attributeLength; i++){
printOut("attrdata:", *p);
p++;
}
#endif
no << endl;
return no;
}
开发者ID:Abner-Sun,项目名称:mysql5.1-vx-pre1,代码行数:48,代码来源:records.cpp
示例5: printOut
// Check if there's any text to work with
bool Transmute::validSize(){
if (heldText.size() <= 1){
printOut();
return false;
}
return true;
}
开发者ID:Rikoru,项目名称:cli-tools,代码行数:8,代码来源:transmute.cpp
示例6: main
int main()
{
//LOCAL DECLARATION
int input; //This is the number entered by the user received from getInput
int num; //This is the variable to be used in the for loop to find the firt prime number
int count; //This is the vaue recieved from calcPrime function
int sec_num; //This is the second number that fulfils the condition of adding to the first number to give double the input
int count2 = 1; //This counts the amount of pairs of prime numbers that have been found
//EXECUTABLE STATEMENTS
input = getInput();
for (num = 1; num <= input; num++)
{
count = calcPrime(num);
if (count == 2)
{
sec_num = input * 2 - num;
count = calcPrime(sec_num);
if (count == 2)
{
printOut(num, sec_num, & count2);
count2++;
}
}
}
if (count2 == 1)
{
printf("\nNo prime pairs found.");
}
printf("\n\n");
return(0);
}
开发者ID:0lumide,项目名称:cs,代码行数:32,代码来源:lab07.c
示例7: printUsage
static void printUsage()
{
printOut(LR::tr(
"Usage:\n"
" lrelease [options] project-file\n"
" lrelease [options] ts-files [-qm qm-file]\n\n"
"lrelease is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert XML-based translations files in the TS\n"
"format into the 'compiled' QM format used by QTranslator objects.\n\n"
"Options:\n"
" -help Display this information and exit\n"
" -idbased\n"
" Use IDs instead of source strings for message keying\n"
" -compress\n"
" Compress the QM files\n"
" -nounfinished\n"
" Do not include unfinished translations\n"
" -removeidentical\n"
" If the translated text is the same as\n"
" the source text, do not include the message\n"
" -markuntranslated <prefix>\n"
" If a message has no real translation, use the source text\n"
" prefixed with the given string instead\n"
" -silent\n"
" Do not explain what is being done\n"
" -version\n"
" Display the version of lrelease and exit\n"
));
}
开发者ID:KDE,项目名称:android-qt,代码行数:29,代码来源:main.cpp
示例8: sudoSolve
//solve measure
void sudoSolve(int step)
{
int i,j,k;
bool flag;
if(step>=81){
printOut();
return ;
}
j=step/9;
i=step%9;
if(sudoOut[j][i]!=0)
sudoSolve(step+1);
else{
for(k=1;k<=9;k++){
if(book[j][k]==0){
flag=rightDefine(j,i,k);
if(flag){
book[j][k]=1;
sudo[j][i]=k;
sudoSolve(step+1);
book[j][k]=0;
sudo[j][i]=sudoOut[j][i];
}
}
}
}
}
开发者ID:rzhengyang,项目名称:algorithm-exercise,代码行数:28,代码来源:sudoku.c
示例9: main
int main()
{
char **array;
array = malloc(9 * sizeof(char *));
for (int i = 0; i < 9; i++)
{
array[i] = malloc(9 * sizeof(char));
if (array[i] == NULL)
{
fprintf(stderr, "out of memory\n");
exit(EXIT_FAILURE);
}
}
for (int i = 0; i < 9; ++i)
for (int j = 0; j < 9; ++j)
array[i][j] = input[i][j];
solveSudoku(array, 9, 9);
printOut(array);
for (int i = 0; i < 9; ++i)
free(array[i]);
free(array);
return 0;
}
开发者ID:st9540808,项目名称:leetcode-SudokuSolver,代码行数:26,代码来源:main.c
示例10: listTree
// The list tree function runs through all objects in the ASDK_DICT dictionary,
// follows their ownership trees, and lists out information
// on all objects in the tree.
//
void
listTree()
{
AcDbDictionary *pNamedobj;
AcDbDictionary *pDict;
acdbHostApplicationServices()->workingDatabase()
->getNamedObjectsDictionary(pNamedobj, AcDb::kForWrite);
// Get a pointer to the ASDK_DICT dictionary.
//
if (pNamedobj->getAt(_T("ASDK_DICT"), (AcDbObject*&) pDict,
AcDb::kForRead) == Acad::eKeyNotFound)
{
pNamedobj->close();
return ;
}
pNamedobj->close();
// Run through the entries and list their backpointers.
//
AcDbDictionaryIterator *pDictItr = pDict->newIterator();
for (; !pDictItr->done(); pDictItr->next()) {
printOut(pDictItr->objectId());
}
delete pDictItr;
pDict->close();
}
开发者ID:FengLuanShuangWu,项目名称:AutoCADPlugin-HeatSource,代码行数:33,代码来源:ownrshp.cpp
示例11: printUsage
static void printUsage()
{
printOut(LU::tr(
"Usage:\n"
" lupdate [options] [project-file]...\n"
" lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file\n\n"
"lupdate is part of Qt's Linguist tool chain. It extracts translatable\n"
"messages from Qt UI files, C++, Java and JavaScript/QtScript source code.\n"
"Extracted messages are stored in textual translation source files (typically\n"
"Qt TS XML). New and modified messages can be merged into existing TS files.\n\n"
"Options:\n"
" -help Display this information and exit.\n"
" -no-obsolete\n"
" Drop all obsolete strings.\n"
" -extensions <ext>[,<ext>]...\n"
" Process files with the given extensions only.\n"
" The extension list must be separated with commas, not with whitespace.\n"
" Default: '%1'.\n"
" -pluralonly\n"
" Only include plural form messages.\n"
" -silent\n"
" Do not explain what is being done.\n"
" -no-sort\n"
" Do not sort contexts in TS files.\n"
" -no-recursive\n"
" Do not recursively scan the following directories.\n"
" -recursive\n"
" Recursively scan the following directories (default).\n"
" -I <includepath> or -I<includepath>\n"
" Additional location to look for include files.\n"
" May be specified multiple times.\n"
" -locations {absolute|relative|none}\n"
" Specify/override how source code references are saved in TS files.\n"
" Default is absolute.\n"
" -no-ui-lines\n"
" Do not record line numbers in references to UI files.\n"
" -disable-heuristic {sametext|similartext|number}\n"
" Disable the named merge heuristic. Can be specified multiple times.\n"
" -pro <filename>\n"
" Name of a .pro file. Useful for files with .pro file syntax but\n"
" different file suffix. Projects are recursed into and merged.\n"
" -source-language <language>[_<region>]\n"
" Specify the language of the source strings for new files.\n"
" Defaults to POSIX if not specified.\n"
" -target-language <language>[_<region>]\n"
" Specify the language of the translations for new files.\n"
" Guessed from the file name if not specified.\n"
" -ts <ts-file>...\n"
" Specify the output file(s). This will override the TRANSLATIONS\n"
" and nullify the CODECFORTR from possibly specified project files.\n"
" -codecfortr <codec>\n"
" Specify the codec assumed for tr() calls. Effective only with -ts.\n"
" -version\n"
" Display the version of lupdate and exit.\n"
" @lst-file\n"
" Read additional file names (one per line) from lst-file.\n"
).arg(m_defaultExtensions));
}
开发者ID:maxxant,项目名称:qt,代码行数:58,代码来源:main.cpp
示例12: main
void main()
{
int a, b, c, d;
enter(&a, &b, &c, &d);
printOut(a, b, c, d);
printf("Your largest number is %d\n\n", large(a, b, c, d));
sort(a, b, c, d);
system("PAUSE");
}
开发者ID:alikashani,项目名称:C_Course,代码行数:11,代码来源:E3H1.cpp
示例13: loadTsFile
static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbose */)
{
ConversionData cd;
bool ok = tor.load(tsFileName, cd, QLatin1String("auto"));
if (!ok) {
qWarning("lrelease error: %s\n", qPrintable(cd.error()));
} else {
if (!cd.errors().isEmpty())
printOut(cd.error());
}
return ok;
}
开发者ID:Fale,项目名称:qtmoko,代码行数:12,代码来源:main.cpp
示例14: program2
void program2()
{
load();
initEmit();
getToken();
block();
if (token.sym != periodsym)
getError(0);
emit(9, 0, 2);
printOut();
closeEmit();
printf("The program is syntactically correct.");
}
开发者ID:brunzero,项目名称:module_3,代码行数:13,代码来源:parser_generator.c
示例15: while
void *thread2() {
// printOut(itoa(mythread_self(),10));
// printOut(": Thread2\n");
int i=0;
while(i<200) {
mythread_mutex_lock(&lock);
glval++;
if(glval==100) {
printOut("Thread2 sleeping for 10000 microseconds to hit blocking mutex condition in thread1\n");
mythread_cond_signal(&cond);
mythread_cond_broadcast(&cond1);
usleep(10000);
}
mythread_mutex_unlock(&lock);
printOut("Using IO in thread2 \n");
i++;
}
}
开发者ID:vinothsid,项目名称:os-mutex,代码行数:22,代码来源:mytest.c
示例16: loadTsFile
static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbose */)
{
ConversionData cd;
bool ok = tor.load(tsFileName, cd, QLatin1String("auto"));
if (!ok) {
printErr(LR::tr("lrelease error: %1").arg(cd.error()));
} else {
if (!cd.errors().isEmpty())
printOut(cd.error());
}
cd.clearErrors();
return ok;
}
开发者ID:KDE,项目名称:android-qt,代码行数:13,代码来源:main.cpp
示例17: doit
void doit(int thresh, int varmax, MR_ROBDD_type *f)
{
MR_ROBDD_type *result;
#ifdef DEBUGALL
printf("MR_ROBDD_restrictThresh(%d, [%d,]", thresh, varmax-1),
printOut(f),
printf(") =");
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
result = MR_ROBDD_restrictThresh(thresh, varmax-1, f);
#else /* MR_ROBDD_USE_THRESH */
result = MR_ROBDD_restrictThresh(thresh, f);
#endif /* MR_ROBDD_OLD */
#ifdef DEBUGALL
printOut(result);
printf("\n");
#endif /* DEBUGALL */
#endif /* !OVERHEAD */
++opcount;
}
开发者ID:DeadZen,项目名称:mercury,代码行数:22,代码来源:test_restrict.c
示例18: ProcessEncrypt
/*
* This method performs encrypt operation given plaintext.
* It read tables from tf and plaintext from fp.
* Encrypts plainetxt using key
*/
void ProcessEncrypt(char *key, FILE *tf, FILE *fp) {
table_check = 0;
ProcessTableCheck(tf);
char buf[16];
int ret = fread(buf, 1, 16, fp);
if (ret < 16) {
fprintf(stderr,
"Input size for encryption can not be less than 16 bytes\n");
exit(1);
}
int i, Nr = 10, Nb = 4, round;
unsigned char **state = (unsigned char **) malloc(
sizeof(unsigned char *) * 4);
for (i = 0; i < 4; i++)
state[i] = (unsigned char *) malloc(sizeof(unsigned char) * 4);
copyInStateArray(state, buf);
unsigned char **word = doProcessKeyExpand(key);
printOut(state, "input", 0);
AddRoundKey(state, word, 0);
printWord(word, "k_sch", 0, 0);
for (round = 1; round < Nr; round++) {
printOut(state, "start", round);
SubBytes(state);
printOut(state, "s_box", round);
ShiftRows(state);
printOut(state, "s_row", round);
MixColumns(state, P);
printOut(state, "m_col", round);
AddRoundKey(state, word, round * Nb);
printWord(word, "k_sch", round * Nb, round);
}
printOut(state, "start", round);
SubBytes(state);
printOut(state, "s_box", round);
ShiftRows(state);
printOut(state, "s_row", round);
AddRoundKey(state, word, Nr * Nb);
printWord(word, "k_sch", Nr * Nb, round);
printOut(state, "output", round);
}
开发者ID:prabhaks,项目名称:AES,代码行数:45,代码来源:aes.c
示例19: doit
void doit(int w, MR_ROBDD_type *f)
{
int result;
#ifdef DEBUGALL
printf("MR_ROBDD_var_entailed(");
printOut(f),
printf(", %d) = ", w);
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
result = MR_ROBDD_var_entailed(f, w);
#ifdef DEBUGALL
printf("%s\n", (result ? "true" : "false"));
#endif /* DEBUGALL */
#endif /* !OVERHEAD */
++opcount;
}
开发者ID:DeadZen,项目名称:mercury,代码行数:18,代码来源:test_var.c
示例20: getRow
void Sudoku::solve(){
int i,j;
ansCount=0;
for(i=0;i<81;i=i+9){//test if the sudoku can be solved
getRow(i,sudokuIn);
if(checkUnity(arr_check)==false){
cout << "0"
<< endl;
return;
}
getCol(i,sudokuIn);
if(checkUnity(arr_check)==false){
cout << "0"
<< endl;
return;
}
getCell(i,sudokuIn);
if(checkUnity(arr_check)==false){
cout << "0"
<< endl;
return;
}
}
for(i=0;i<81;i++){
answerBoard[i]=sudokuIn[i];
}
fillBlank();
if(ansCount==1){
cout << "1" << endl;
printOut(keepAns);
}
else if(ansCount==0)
cout << "0";
else if(ansCount==2){
cout << "2";
}
};
开发者ID:kirin111697,项目名称:pd2-sudoku,代码行数:41,代码来源:Sudoku.cpp
注:本文中的printOut函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论