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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

nss

@nss
About
Posts
211
Topics
86
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • isalpha, isalnum
    N nss

    thanks!

    C / C++ / MFC question

  • isalpha, isalnum
    N nss

    1.These two are supposed to take int args: Yet I see them being used a as isalpha('t') etc, i.e we are giving it a char arg. Why is that? 2.I did:

    char r[256] ;
    int t;
    cout << " enter string ";
    char c = cin.peek();
    cin >> r;
    while (c != '\n')

    {
      c = cin.peek();
      if (isalpha(c))cin >> r;
    }
    

    cout << " tr" << r << endl;
    }

    but when I put in 'abc%def' i got back the identical thing, not 'abcdef' which is what I expected... 3.Also I wanted to weed out spl chars using isalnum so that an input like abd$ef would get fed in and come out like abdef: char s[256]; cin >>s; but isalnum wont work either... :confused::confused: thanks, ns

    C / C++ / MFC question

  • iterator
    N nss

    Thanks!!!

    C / C++ / MFC question

  • iterator
    N nss

    I have an iterator that is pointing to a certain element. I want to overwrite this element with the next one following it. *I is the current element. But if I do ++I to get to the next element I lose my place.... I dont think *I = *(++I) is quite going to do it. (what would this do anyways? ) :confused: thanks, ns

    C / C++ / MFC question

  • makefile problem
    N nss

    Thats exactly it!! I had been trying different places to put in the xstring.o but it didnt occur to me to add it to the fMyClass.x line as well. Many many thanks! ns

    C / C++ / MFC help c++ question

  • strtol problem
    N nss

    right, the first arrest is at ' ', but right afterit should choke on 'a' as well...... 23 12 a4 56..... It never prints out *pc = 'a'

    C / C++ / MFC help question

  • strtol problem
    N nss

    I am using strtol to catch bad entries: looping on i { fgets(line, MAX_SIZE -1, fp); pc = line; for ( unsigned int j = 0; j < cols ; ++j, ++col) { num = strtol( pc, &pc, 10); cout << i << " " << j << " " <<num<< " pc " << (*pc==' '?'.':*pc) << endl; line comes from a file that looks like: 9 a5 3 9 1 3 9 5 5 7 10 9 4 6 10 10 8 5 1 7 10 12 1 3 10 10 10 11 12 3 /// an 'a' snuck in...strtol should arrest it, but it never does. (however with a9 5 3 9 3 9 3 8 5 3, I see the letter 'a' in the cout.....) Here is the output for the first case (when a doesnt show...) 0 0 9 pc . 0 1 0 pc .//pc should have been 'a', num is 0 is okay since it didnt get read 0 2 0 pc .//'num' should have been 5 0 3 0 pc . 0 4 0 pc . 0 5 0 pc . 0 6 0 pc . 0 7 0 pc . 0 8 0 pc . 0 9 0 pc . Any ideas why strtol isnt performing as I understand it should? thanks, ns

    C / C++ / MFC help question

  • cout behavior........
    N nss

    This is the hundredth time I have made this same mistake.....I say MyClass * ptr, and then blithely do a ptr->method() on it, without having allocated memory which I think is what the problem is here. Many thanks. ns

    C / C++ / MFC question

  • constructor implementation question
    N nss

    Appreciate the response.Good to get the go-ahead....:) ns

    C / C++ / MFC question c++ docker

  • constructor implementation question
    N nss

    Theres a container class MyClass which has in it a class MyB (declarted in the h file). I am implementing the constructor of MyB. So in the cpp file does it look like: MyClass::MyB::MyB() { } ? thanks, ns

    C / C++ / MFC question c++ docker

  • how to change the title bar of mainframe of proj?
    N nss

    Wow! Cant wait to try it tomorrow. Thanks so much!!!! ns

    C / C++ / MFC c++ tutorial question

  • menuiteminfo question
    N nss

    Thanks! I'll check. ns

    C / C++ / MFC help question

  • ShellExecute problem
    N nss

    I think I didnt explain right: I want the .htm file to open up in explorer. Its not an exe file. Thanks, ns

    C / C++ / MFC help question

  • ShellExecute problem
    N nss

    I finally settled on this but am still uneasy.

    HINSTANCE res = ShellExecute(NULL,"Open", helpFile, "","E:\\\\", SW\_SHOWNORMAL);	
    
    int r = (int)res;
    
    if(r <=32)ShellExecute(NULL,"Open", helpFile, "","C:\\\\", SW\_SHOWNORMAL);
    

    I imagine all I need in the 5th paramtere is the drive letter where the explorer exe is stored. My assumption that its either in E or C is dangerous. How should I handle this dilemma? Thanks, ns

    C / C++ / MFC help question

  • need help with fread
    N nss

    Thank you so much for your detailed response! I see I had totally misunderstood fread! I'll check it out. I had thought CStdioFile and atof was too circuitous but I now see that fread is also doing chars..... thanks, ns

    C / C++ / MFC data-structures help tutorial

  • code doesnt go into mouseMove
    N nss

    Ok. Will do! Thank you!

    C / C++ / MFC debugging learning

  • safe to close a modeless with EndDialog?
    N nss

    Thanks!

    C / C++ / MFC question

  • sendmessage and CDialog pointer
    N nss

    Terrific! Many thanks. I also wonder if GetParent()->RunParentFunction() would work.....I will try it. Apprecite your help greatly! I didnt know about the reinterpret_cast....

    C / C++ / MFC question

  • sendmessage and CDialog pointer
    N nss

    Cant do those. I am unable to include my view.h file into the cdialog.h file due to deeply entrenched circular includes... So is SendMessage a bad idea?

    C / C++ / MFC question

  • sendmessage and CDialog pointer
    N nss

    I need to transmit the pointer of the CDialog to the parent > I am not able to set a member of the parent because it doesnt fit with my scheme. So can I do this? m_pParent->SendMessage(UDM_SOMETHING, this, ndummy) ? Thanks

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

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