User Profile

Collapse

Profile Sidebar

Collapse
Netwatcher
Netwatcher
Last Activity: Sep 6 '09, 02:00 PM
Joined: Sep 1 '08
Location: Currently in the U.S- carlsbad NM
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Netwatcher
    replied to List files in directory
    in C
    Used an allocated array but with new(C++) instead of malloc(C)

    Tried malloc too, found that new is simply faster (though delete is slower than free, and there's no reallocation with new :p)

    Code:
    	
    char** pt;
    pt = new char*[50];
    unsigned n=0;
    for(/*noimportant*/;n++)
    {
    /*lala
    lala*/
    pt[n]= hFindFile.cFileName;
    }
    for (n=0;pt[n]!=NULL;n++)
    {
    ...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to MFC and Visual Studio
    haha, I'm sorry but my grammar might not be perfect,
    This is what i meant:

    WoW 15$!!!
    *new subject*
    (obviously i cant get it for that price and only for a high price atm)
    [sarcasem]
    If i want to learn deep Win32 to be able to do these stuff with it i might spend more money on books than on VS...
    [/sarcasem]

    I'm actually searching google for a nice low price.
    found this...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to MFC and Visual Studio
    GOD! i was just returning a favor for


    It's just something Tim the Toolman say... was a joke.
    Didn't you notice the QUOTES??!!111on eoneone
    The real man's way will be writing your own Wrapper, why not....

    Returning to reality land,
    WOW $15 !!!
    might need to spend money on books more then i would on VS lol,
    so yea, i'll stick to win32 for now.

    Allen out.
    ...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    List

    Think a linked list is the way to go on this one.
    (In these situation python is so tempting)




    Thanks,
    Netwatcher.
    http://www.csref.info <-> code reference site.
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to MFC and Visual Studio
    I said i mainly need it for MFC and res editing...

    Although I like doing things the man's way... *long pause*
    I meant things like MFC, ATL, resource editor,setup projects and all the good stuff that come with the package that somewhat enhance the programming experience.

    I am currently not in a CS/Programming course, does it matter if I'm just a
    High-School student?(i.e. "Academic proof required&...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Yes

    Yep!
    Without using STL or any other templates.
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Is there a way to solve my problem without using a template (for educational purpose)?
    The rawer the better(no assembly code lol),
    Even only general guidelines on how to solve this.
    See more | Go to post

    Leave a comment:


  • Netwatcher
    started a topic MFC and Visual Studio

    MFC and Visual Studio

    Is there a way to get the MFC libraries for free?


    if not, (and probably not)...

    Is buying Visual Studio worth it?
    I know I'm going to use C# and C++.
    I'm not a "pro", but i need more power then the express edition offers.

    If so, which version/edition should i get?
    (need it mainly for resource editing and MFC)


    Ty for your time.
    Netwatcher.
    See more | Go to post

  • Netwatcher
    replied to List files in directory
    in C
    Yeepy KEE.I.A

    Damn me... forgot u used the namespace again... (string)
    nyway...

    after a nightmare of trial and error and reading MSDN...
    i got it... i finally got it :D
    got it all figured out and i probably should stop writing everything I'm panicing with... (see silly posts above)

    Thank you so much.
    I'm not gonna use arrays again!!! (wait what? just kidding)
    the iterator...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Damn i didnt notice u using the namespace...
    I was so frustrated why it won't work when i just do "vector<string> "...

    or do i need to
    the while loop goes through files in the directory
    the "findFileData.c FileName" is a CHAR(WCHAR in unicode)
    do i just use push back in the while loop?
    does that create a new element or creates and stuffs a new element?

    Code:
    int
    ...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Thanks!
    using multi-byte charset, :p this vector thing is new to me gonna read on that some
    vector doesnt seem to have this method.
    do i need to a include a .lib or do anything special before using vectors?

    some time later in the day>>
    Darnit! its a '::' method (I'm tired...) was just playing around and found it.





    If the world is crashing down on you,...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    well think i made my work difficult cos arr is an array of pointers >,<
    how else can i store whole strings in a non-pointer way?
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    so what do i need to do to findFileData?
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    *headscratch...
    so what do i need to do in order to save this the right way?
    its not directed to the last file i found its directed to nothing, say i have exceeded the length of the streamsize when i try to print out arr[element]
    Edit:
    my right- to actually store the letters inside the (char*) in the spacific element of the array! (it is a char* array)
    cant find a str method for this >,< or is there?
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Umm.... it just returns the last file it finds(the same file again and again) until i tell it to stop!

    Edit: HAHA no need to actually check for the error but thx for pointing my attention at the fact that it returns something if it fails... forgot about that(yep, stupidity gets over me sometimes, well really often)

    Code:
    while(FindNextFile(hFind,&findFileData))
    	{
    		
    		f++;
    		arr[f]
    ...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to List files in directory
    in C
    Yeepy...

    So, i got that all good and figured out :p

    Code:
    //this goes to superduperwhat.cpp
    #include <windows.h>
    #include <stdio.h>
    #include <iostream> 
    char* locjpg = "C:\\Documents and Settings\\yair\\Desktop\\UNIMPICS\\*.jpg";
    char* locbmp = "C:\\Documents and Settings\\yair\\Desktop\\UNIMPICS\\*.bmp"; 
    char* arr[50];
    char* nfilen;
    ...
    See more | Go to post

    Leave a comment:


  • Netwatcher
    started a topic List files in directory
    in C

    List files in directory

    Hello, I've been trying to get a list of files from given directory in C++ (with win32)
    but i encountered some weird problems

    Code:
    //test snippet
    #include <windows.h>
    #include <stdio.h>
    #include <iostream>
    
    int main()
    {
    
    //find file data	
        WIN32_FIND_DATA findFileData;
     HANDLE hFind = FindFirstFile((LPCSTR)"C:\\Documents and
    ...
    See more | Go to post

  • Netwatcher
    replied to DirectX dsutil.cpp error
    in C
    ("Beginning Game Programming, Second edition"-chapter 9)
    I take it back...
    I'm using IBM T42 Thinkpad with with default hardware & newest Audio Drive
    The program loads A-okay but no sound whatever what i do :( can it be that
    My Audio hardware is not compatible with the DXaudio(using dsutil.cpp/h) lib? (i CAN play wav files with normal audio players)
    See more | Go to post

    Leave a comment:


  • Netwatcher
    replied to DirectX dsutil.cpp error
    in C
    Well it did exactly what i did :p
    But! it helped me find the real bug...
    debugging is a nasty process!
    Thanks :D
    See more | Go to post

    Leave a comment:


  • Netwatcher
    started a topic DirectX dsutil.cpp error
    in C

    DirectX dsutil.cpp error

    I've been trying to compile a program, everything is going fine until i get this little error:
    Code:
    ------ Build started: Project: Play_Sound, Configuration: Debug Win32 ------
    Compiling...
    dsutil.cpp
    c:\documents and settings\###\my documents\visual studio 2008\projects\play_sound\play_sound\dsutil.cpp(686) : error C2065: 'i' : undeclared identifier
    c:\documents and settings\###\my documents\visual studio 2008\projects\play_sound\play_sound\dsutil.cpp(687)
    ...
    See more | Go to post
No activity results to display
Show More
Working...