基本上我在[JsonObject]
public partial class EquipmentItems : List<EquipmentItem>
{ }
[JsonObject]
public partial class EquipmentItem : IItemData
{
#region Private fields
private string equipmentIDField;
private string catIDField;
private string classIDField;
private string lineSequenceField;
private string quantityField;
private string toolFlexField;
private string hourlyRateField;
private string dailyRateField;
private string weeklyRateField;
private string monthlyRateField;
private string minRateField;
private bool daysOverField;
private bool weeksOverField;
private bool monthsOverField;
#endregion
#region Public properties
/// <remarks/>
public string Equipment
{
get
{
return this.equipmentIDField;
}
set
{
this.equipmentIDField = value;
}
}
/// <remarks/>
public string CatID
{
get
{
return this.catIDField;
}
set
{
this.catIDField = value;
}
}
/// <remarks/>
public string ClassID
{
get
{
return this.classIDField;
}
set
{
this.classIDField = value;
}
}
/// <remarks/>
public string LineSeq
{
get
{
return this.lineSequenceField;
}
set
{
this.lineSequenceField = value;
}
}
/// <remarks/>
public string Quantity
{
get
{
return this.quantityField;
}
set
{
this.quantityField = value;
}
}
/// <remarks/>
public string ToolFlex
{
get
{
return this.toolFlexField;
}
set
{
this.toolFlexField = value;
}
}
/// <remarks/>
public string HrRate
{
get
{
return this.hourlyRateField;
}
set
{
this.hourlyRateField = value;
}
}
/// <remarks/>
public string DayRate
{
get
{
return this.dailyRateField;
}
set
{
this.dailyRateField = value;
}
}
/// <remarks/>
public string WkRate
{
get
{
return this.weeklyRateField;
}
set
{
this.weeklyRateField = value;
}
}
public string MinRate
{
get
{
return this.minRateField;
}
set
{
this.minRateField = value;
}
}
/// <remarks/>
public string MoRate
{
get
{
return this.monthlyRateField;
}
set
{
this.monthlyRateField = value;
}
}
/// <remarks/>
public bool DayOver
{
get
{
return this.daysOverField;
}
set
{
this.daysOverField = value;
}
}
/// <remarks/>
public bool WkOver
{
get
{
return this.weeksOverField;
}
set
{
this.weeksOverField = value;
}
}
/// <remarks/>
public bool MoOver
{
get
{
return this.monthsOverField;
}
set
{
this.monthsOverField = value;
}
}
#endregion
}
Xcode Version 8.3 (8E162)
我看到有关#include <iostream>
using namespace std;
int main() {
int a;
cout << "What is your age: ";
cin >> a;
cout << "My age is " << a << endl;
return 0;
}
需要刷新以及所有std::cout won't print和Xcode debugger not showing C++ cout output的不同问题。在我放置cout
之前,Xcode调试器不会打印cout
。但是,它在终端上运行得非常好。
如果我必须在单行中使用\n or endl
和用户输入年龄而不是放置What is your age:
的下一行,该怎么办?
这是Xcode调试器在构建和运行后显示的内容
这是用户输入并显示结果
这是在终端上,这正是我需要Xcode调试器上的输出。
答案 0 :(得分:2)
通过一些研究,cin and cout
上发布的Xcode Version 8.3 Build 8E162
上的Mar 27, 2017
流似乎存在错误。
降级为Xcode Version 8.2.1
就像魅力一样。
答案 1 :(得分:0)
您已经自己解决了问题:zip=4000
使用缓冲输出,应该始终刷新。您可以使用std::cout
,使用std::cout << "What is your age? << std::flush
或添加隐式刷新的std::cout.flush()
换行符来实现此目的。
完整的解决方案可能如下所示:
std::endl