CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 6 FirstFirst 123456 LastLast
Results 31 to 45 of 84
  1. #31
    Join Date
    Jun 2008
    Posts
    592

    Re: Can someone please run this in XP

    Hopefully he will be back and has tried more
    0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
    0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000
    0000 0000 0000 0000

  2. #32
    Join Date
    May 2010
    Posts
    76

    Re: Can someone please run this in XP

    Paul McKenzie,

    Please do not respond to any more of my posts including this one. I am really not needing to hear your comments anymore. I tried the code but I keep getting the same issue with the same errors...

    'Palindrome.exe': Loaded 'C:\Users\Bryan\Documents\CSI 345\Palindrome\Debug\Palindrome.exe', Symbols loaded.
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
    The program '[1240] Palindrome.exe: Native' has exited with code 0 (0x0).


    These errors keep going to the same place which is if (argc>1) and my newest try which is at if (argc ==3) I also went to goggle to make sure generate debug info is saved to yes and it was

  3. #33
    Join Date
    May 2010
    Posts
    76

    Re: Can someone please run this in XP

    And I did not mean that post as negative to anyone else but Ill never use C++ again and just trying to get through this last program before thursday which is my last deaddline

  4. #34
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,725

    Re: Can someone please run this in XP

    How are you executing the program from the command prompt ? If
    you are using argc==3 , you need to execute with something like:

    Palindrome.exe input_file_name output_file_name

    As I mentioned in my first post, why are you using argc and argv ?

    Why not just hardwite the names of the files ?

  5. #35
    Join Date
    Jun 2008
    Posts
    592

    Re: Can someone please run this in XP

    Try my code and report the error any error. Also read about microsoft visual studio and setting up command arguments http://stackoverflow.com/questions/2...-visual-studio

    or do what Philip suggest since it is easier to start with.

    Quote Originally Posted by jimJohnson123
    but I keep getting the same issue with the same errors...

    'Palindrome.exe': Loaded 'C:\Users\Bryan\Documents\CSI 345\Palindrome\Debug\Palindrome.exe', Symbols loaded.
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
    'Palindrome.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
    The program '[1240] Palindrome.exe: Native' has exited with code 0 (0x0).
    Theses errors are of no concern to your problem
    0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
    0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000
    0000 0000 0000 0000

  6. #36
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    Paul McKenzie,

    Please do not respond to any more of my posts including this one. I am really not needing to hear your comments anymore. I tried the code but I keep getting the same issue with the same errors...
    It is just because you think you are "not needing to hear your comments anymore". It is verz bad but for you only!

    Quote Originally Posted by jimJohnson123 View Post
    ... Ill never use C++ again and just trying to get through this last program before thursday which is my last deaddline
    I would suggest you to use neither any type of programming nor any work concerning logic and mathematics.
    Victor Nijegorodov

  7. #37
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    Paul McKenzie,

    Please do not respond to any more of my posts including this one. I am really not needing to hear your comments anymore.
    Sorry, CodeGuru doesn't work like that.

    If you answered the questions I asked you, maybe you would solved the problem you're having. The questions I asked you are relevant to this entire discussion. You have an issue, and the issue is that you did not understand why an "else" block was executed, and I explained it to you very clearly. The reason why was that a variable, namely argc, was set to a number. Then I politely asked you where argc gets its value, but you couldn't answer.

    The only conclusion that anyone can make from this is that you don't know what you've programmed, and you're relying on basically copying what Joeman and others are giving you and hoping it works.

    Regards,

    Paul McKenzie

  8. #38
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Can someone please run this in XP

    Quote Originally Posted by VictorN View Post
    I would suggest you to use neither any type of programming nor any work concerning logic and mathematics.
    Programming just isn't made for everyone, yet everyone who takes up programming thinks they can tackle the work.

    When it comes to logical thinking and thinking in discrete steps to reach a final goal, some persons have brains that are just not wired for this type of thinking, regardless of how smart they are in other fields.

    Regards,

    Paul McKenzie

  9. #39
    Join Date
    May 2010
    Posts
    76

    Re: Can someone please run this in XP

    the reason i use argc and argv is because it is required

  10. #40
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    the reason i use argc and argv is because it is required
    But to use them properly you must know what they are!
    Victor Nijegorodov

  11. #41
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Can someone please run this in XP

    Quote Originally Posted by VictorN View Post
    But to use them properly you must know what they are!
    Exactly my point.

    Regards,

    Paul McKenzie

  12. #42
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    the reason i use argc and argv is because it is required
    And in my programs I write, I'm also required to use argc and argv in many cases. The difference is that I know what they are used for, and I'm asking if you know what they are used for.

    The entire reason for this thread from the start is that you didn't understand what these values are or what their purpose is. The value of argc was causing that message to be printed out, and that again is because the if() statement that you wrote says to print that message if argc <= 1.

    I didn't write that if() statement, you wrote it, so it's expected and assumed that you are able to understand what you had written.

    Regards,

    Paul McKenzie

  13. #43
    Join Date
    May 2010
    Posts
    76

    Re: Can someone please run this in XP

    What if I changed them to like...

    int main(int argc[], char *argv[]){

    HANDLE readFile, writeFile;
    HANDLE readFileMap, writeFileMap;
    PVOID pvreadFile, pvwriteFile;
    DWORD readFileSize;
    string word = "";
    list<string> words;

    //VERIFYING ARGUMENTS
    if(argc[3]>1)

  14. #44
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    What if I changed them to like...

    int main(int argc[], char *argv[]){

    HANDLE readFile, writeFile;
    HANDLE readFileMap, writeFileMap;
    PVOID pvreadFile, pvwriteFile;
    DWORD readFileSize;
    string word = "";
    list<string> words;

    //VERIFYING ARGUMENTS
    if(argc[3]>1)
    Did you try to compile it?
    Victor Nijegorodov

  15. #45
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Can someone please run this in XP

    Quote Originally Posted by jimJohnson123 View Post
    What if I changed them to like...

    int main(int argc[], char *argv[]){
    You shouldn't be coding blindly and hoping something that works. The main() function has the following signature:
    Code:
    int main(int argc, char *argv[])
    // or
    int main()
    You cannot change this -- if you did, the code will not compile.

    The first parameter is not an array of int, it must be a single int. But I'll ask again, what does argc mean in that parameter list? What is its purpose? Say if argc == 2, what does the "2" mean?

    This should be stated clearly in the C++ book that you're using as to the purpose of these two parameters, argc and argv, to the main() function.

    Regards,

    Paul McKenzie

Page 3 of 6 FirstFirst 123456 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured