Changeset 1549 for trunk/Cbc/examples


Ignore:
Timestamp:
Dec 8, 2010 2:28:52 PM (8 years ago)
Author:
lou
Message:

Make Visual Studio v9 build work again.

Location:
trunk/Cbc/examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/examples/cbc_driverC_sos.c

    r1468 r1549  
    2323{
    2424  const char prefix[] = "cbc_driverC_sos.cpp::callBack(): ";
    25   const int  VERBOSE = 0;
     25  const int  VERBOSE = 4;
    2626  if (VERBOSE>0) printf("%s begin\n",prefix);
    2727  if (VERBOSE>1) printf("%s messageNumber %i\n",prefix,messageNumber);
     
    4949{
    5050  const char prefix[] = "cbc_driverC_sos.cpp::getDefaultModel(): ";
    51   const int  VERBOSE = 0;
     51  const int  VERBOSE = 4;
    5252  Cbc_Model  *model;
    5353  int status;
     
    6969  Cbc_registerCallBack(model,callBack);
    7070  /* Keep names when reading an mps file */
    71   if (argc<2) {
     71  if (argc < 2) {
    7272#if defined(SAMPLEDIR)
    73     status=Cbc_readMps(model, SAMPLEDIR "/p0033.mps");
     73  /*
     74    SAMPLEDIR should be something like "path/to/mps/directory/", including the
     75    quotes and final directory separator. Don't forget to properly escape
     76    '\' when using native Windows path syntax.
     77  */
     78    status=Cbc_readMps(model,SAMPLEDIR "p0033.mps") ;
    7479#else
    75     fprintf(stderr, "Do not know where to find sample MPS files.\n");
     80    fprintf(stderr, "Please specify the full path to an MPS file on the command line\n");
    7681    exit(1);
    7782#endif
     
    210215{
    211216  const char prefix[] = "cbc_driverC_sos.cpp:main(): ";
    212   const int  VERBOSE = 0;
     217  const int  VERBOSE = 4;
    213218  Cbc_Model * model, * model2;
    214219  double time1;
  • trunk/Cbc/examples/sample2.cpp

    r1468 r1549  
    7373  // Read in model using argv[1]
    7474  // and assert that it is a clean model
    75   const char dirsep =  CoinFindDirSeparator();
     75  std::string dirsep(1,CoinFindDirSeparator());
    7676  std::string mpsFileName;
    77 #if defined(SAMPLEDIR)
    78   mpsFileName = SAMPLEDIR "/p0033.mps";
    79 #else
     77# if defined(SAMPLEDIR)
     78  mpsFileName = SAMPLEDIR ;
     79  mpsFileName += dirsep+"p0033.mps";
     80# else
    8081  if (argc < 2) {
    8182    fprintf(stderr, "Do not know where to find sample MPS files.\n");
    8283    exit(1);
    8384  }
    84 #endif
     85# endif
    8586  if (argc>=2) mpsFileName = argv[1];
    8687  int numMpsReadErrors = solver1.readMps(mpsFileName.c_str(),"");
Note: See TracChangeset for help on using the changeset viewer.