|
-
May 24th, 2011, 09:11 AM
#31
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
-
May 24th, 2011, 08:06 PM
#32
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
-
May 24th, 2011, 08:08 PM
#33
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
-
May 24th, 2011, 08:15 PM
#34
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 ?
-
May 24th, 2011, 08:37 PM
#35
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.
 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
-
May 25th, 2011, 01:09 AM
#36
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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! 
 Originally Posted by jimJohnson123
... 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
-
May 25th, 2011, 04:59 AM
#37
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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
-
May 25th, 2011, 05:03 AM
#38
Re: Can someone please run this in XP
 Originally Posted by VictorN
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
-
May 26th, 2011, 02:47 PM
#39
Re: Can someone please run this in XP
the reason i use argc and argv is because it is required
-
May 26th, 2011, 02:50 PM
#40
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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
-
May 26th, 2011, 02:53 PM
#41
Re: Can someone please run this in XP
 Originally Posted by VictorN
But to use them properly you must know what they are!
Exactly my point.
Regards,
Paul McKenzie
-
May 26th, 2011, 03:02 PM
#42
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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
-
May 26th, 2011, 03:03 PM
#43
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)
-
May 26th, 2011, 03:07 PM
#44
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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
-
May 26th, 2011, 03:10 PM
#45
Re: Can someone please run this in XP
 Originally Posted by jimJohnson123
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|