Changeset 291


Ignore:
Timestamp:
Mar 27, 2006 7:00:38 PM (14 years ago)
Author:
lou
Message:

Sun CC says `line 2141: Error: Cannot use const char* to initialize char*.' GCC
is not so fussy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Test/CoinSolve.cpp

    r274 r291  
    88#include <cmath>
    99#include <cfloat>
    10 #include <string>
     10#include <cstring>
    1111#include <iostream>
    1212
     
    21392139                  if (CbcOrClpRead_mode==2&&argc==2) {
    21402140                    // only if ends .mps
    2141                     char * find = strstr(fileName.c_str(),".mps");
    2142                     if (find&&find[4]=='\0') {
    2143                       find[1]='p'; find[2]='a';find[3]='r';
     2141                    std::string::size_type loc = fileName.find(".mps") ;
     2142                    if (loc != std::string::npos &&
     2143                        fileName.length() == loc+3)
     2144                    { fileName.replace(loc+1,3,"par") ;
    21442145                      FILE *fp=fopen(fileName.c_str(),"r");
    21452146                      if (fp) {
Note: See TracChangeset for help on using the changeset viewer.