[ create a new paste ] login | about

Link: http://codepad.org/CBjixK5G    [ raw code | output | fork ]

C++, pasted on Jan 25:
#include<iostream>
#include<vector>

using namespace std;

typedef struct{
  int powerlevel;
  int tx_time;
}timeInPowerLevel;

vector<timeInPowerLevel> prevTimePowerLevel;

int main()
{
  vector<timeInPowerLevel> newTimePowerLevel;
  
  for(int i = 0; i < 5; i++)
  {
    newTimePowerLevel.push_back({i,i*5});
  }

  for(int i = 0; i < 5; i++)
  {
    cout<<" PowerLevel %d, tx_time %d \n "<<newTimePowerLevel[i].powerlevel,
    newTimePowerLevel[i].tx_time;
  }
  
  return 1;
}


Output:
1
2
3
In function 'int main()':
Line 19: error: expected primary-expression before '{' token
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: