Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Stefan61

@Stefan61
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to utilize "(int argc, const char * argv[]) " in a program
    S Stefan61

    I found the following program that count the number of words within a phrase but I don't understand the initial code defined on the int main : " int argc,const char * argv[] just want learn. thanks -------------------------------------- #include using namespace std; int main(int argc, const char * argv[]) { // ask the user to enter a string cout << "Enter a string: "; // save the string entered by the user string input; getline(cin, input); int numberOfWords = 0; // loop through the input and count all the spaces int inputLen = (int)input.length(); for (int i=0; i<inputLen; i++) { char current = input.at(i); if (isspace(current)) { numberOfWords++; } } // in case there were words, and not empty string, remember that there's always // one space less than the actual number of words if (numberOfWords > 0) { numberOfWords++; } // print the number of words cout << "\nNumber of words = " << numberOfWords << endl;; return 0; }

    C / C++ / MFC css tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups