Thats why i hate c++
-
yes I know but at least in managed languages you get a nice error message not a blank error messsage, thats why I hate c++
Vasily Tserekh wrote:
yes I know but at least in managed languages you get a nice error message not a blank error messsage, thats why I hate c++
You "hate" C++ because you don't understand it. To be clear, in .NET languages like C# and VB.NET (and similarly in Java), when there is a unhandled fault, the end user is presented with a exception that includes a stack trace. Generally you would never want a end-user to see a stack-trace. You can get exactly the same thing in C++ if you choose to, but it requires additional work that is done for you in a managed environment. Generally stack traces are available in a debugger.
/* Charles Oppermann */ http://weblogs.asp.net/chuckop
-
yes i know that but imagine that you cant trace an error because when you debug the executable it doesnt show up, what would you do?
Switch to VB?
-
Step 7a: Read the code and try to locate the problem by analysis Step 7b: (only if 7a fails) Try to shorten the code to rule out as much of it as possible as source of the problem Step 7c: Identify potentially problematic code in what is left over and monitor it by logging Step 7d: Draw conclusions from the logged values, go back to 7b if the results are not conclusive Step 8: Fix the problem Step 9: Restore all the code that has been commented out during troubleshooting And now repeat 500 times 'I WILL NOT SHOUT AT THOSE WHO TRY TO HELP ME'. Edit: And there is also the tiny possibility that the compiler is a little antiquated and has a little problem with newer windows versions. Edit^2: Borland C++ Builder is from 2002. 10 years old, meaning it's probably a rare item in computer museums :)
At least artificial intelligence already is superior to natural stupidity
-
I remember fixing unstable hardware by putting a probe onto the right place.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
I surely know what i am talking about, HOW TO CLEAN A CODE THAT YOU CANT DEBUG. and surely you have ever worked with c++ builder 6, c++ builder doesnt have a debug and release version it only has a single output, instead of giving new ideas you talk about how good you are and how ignorant i am. I will make it simple so your mind can understand!!! step one -you write code step two -you compile that code step tree your ide launches the .exe and you try it step four you test your program and i does just fine step five you go to the application folder and make double click on the executable step six the application show and erro message with no error at all now you get it, how CAN YOU ISOLATE THE PROBLEM and when you isolate it what will you do if you can trace what is wrong
I promise you that you surely don't know what you are talking about. The symptom you are describing is an operating system issue. You are: step one - missing dlls. C++ Builder will alter the environment variables to account for any dlls you are dependent on. step two - when your code is in the wild, it needs the dependent dlls. That includes any dlls that you have written and the C++ Builder C/C++ runtime dlls. step three - if you were using Visual Studio, you would need to install vcredist when running wild. step four - Java, C#, Python... all have their issue that correspond to this one. step five - Don't post here and ask for help and then argue with the people who are trying to help you. You come off arrogant and based on your first post, you don't have the right to be that arrogant. If you hate C++, try C#. If you know C#, stick with C#. Just know that you won't be able to do anything outside the sandbox.
-
hello, thanks for the help but that was five years ago that was the ultimate reason to select C# as main language, I have not any plans to fix that code i dont need it. Now i remember the error message: a popup window with this: external exception and no more, somewhat i located the error message in a simply i/o read but i couldnt do anything because the SAME code worked in other projects and I wasnt able to tell what was wrong i had to drop the project. now c++ fans how many times where you stucked because an error that have you haunted for weeks- a LOT since i use c# i never ever had an uncomprehensive stupid error again and please this is not a question forum i post it here to see if anyone had that kind of error once in their lives to feel that i am not alone
I have never had a problem haunt me for weeks. Post your code here for review. I'm certain I could fix it in a few minutes. I can write C# code that would haunt you for weeks. As far a feeling alone. I'm certain that you are not alone. I work with other engineers who are stuck a Perl. When they try Python or C#, there are too many problems to solve. They will tell you that Perl is easy and doesn't have any problems. Take an assembly language class. I think it will illuminate just what computers do.
-
Step 7a: Read the code and try to locate the problem by analysis Step 7b: (only if 7a fails) Try to shorten the code to rule out as much of it as possible as source of the problem Step 7c: Identify potentially problematic code in what is left over and monitor it by logging Step 7d: Draw conclusions from the logged values, go back to 7b if the results are not conclusive Step 8: Fix the problem Step 9: Restore all the code that has been commented out during troubleshooting And now repeat 500 times 'I WILL NOT SHOUT AT THOSE WHO TRY TO HELP ME'. Edit: And there is also the tiny possibility that the compiler is a little antiquated and has a little problem with newer windows versions. Edit^2: Borland C++ Builder is from 2002. 10 years old, meaning it's probably a rare item in computer museums :)
At least artificial intelligence already is superior to natural stupidity
Everybody hold on one minute and take a deep breath. True: the HoS is not for questions. So look closely at the title of this thread and the original post. Vasily did not ask a question, he told a story from long ago (C++ builder 6 came out in 2002) when he was "beginning to make some programs" and ended up hating C++. He was not asking for help, and he reasonably responded to unsolicited advice by reasserting his reasons for hating C++. You may not share or understand the bad taste the experience left in his mouth, but do not slam his competence (he was a beginner ten years ago, remember?) and drag him into a screaming match then bitch-slap him for getting frusterated. Get a GRIP. Now... I learned to program as a kid in the early 80's and was good at it until I tried to learn OOP and windows programming simultaneously without a teacher, using Borland OWL on Win3.1. With no internet. The documentation was...terse. My code was corrupting the bitmaps used for drawing the minimize/maximize/close buttons. My code crashed. Then my code crashed WINDOWS and dumped out to the command prompt. Not kidding. Bad taste in mouth. For Windows, lParam, wParam, C++, Borland, the whole mess. It was definately HoS experience. I still hate C++ on a deep emotional level that will not be mollified by any appeal to reason. Today I program command line apps in ANSI C and couldn't be happier.
-
a price that you wont notice on core i processors
In case you didn't realize: the reason Vista was so bad was that it was mostly programmed in C#. The result was a shabby, unstable, and unreliable system that was unusable to thousands of users all over the world. The reason Windows 7 is a lot more stable is that MS reprogrammed much of the OS in C++. Also, the error message you got most certainly wasn't related to what programming language you used. If you had done the same in C#, most likely the only difference would have been that you might have been given a hunch of what library or subsystem was at fault. A short question on a user forum like this likely would have provided you with the means of that same info as well, and on top of that with some advice how to fix it. You had an unlucky experience at a time when you were experimenting with C++, but that doesn't mean that C++ at fault anymore than your car manufacturer is at fault when a meteor hits your car.
-
Vasily Tserekh wrote:
now c++ fans how many times where you stucked because an error that have you haunted for weeks- a LOT
since i use c# i never ever had an uncomprehensive stupid error againSounds like a case of selective perception to me. I would also like to have that version of the .Net framework that never does strange things :) C++ has two faces. It allows low level programming close to the computer's hardware, down to supporting writing assembly directly. On the other side it allows to go to a very high level, not dissimilar from what you do in C#. What makes C++ so scary? It can't be strange behavior, because you will encounter that in some form everywhere. C++ libraries are not perfect and the .Net framework also is not. The scary part must actually be low level programming where you must know what you are doing but also get very fine control over what's going on in return. Don't you know that the nice safe .Net world has a price?
At least artificial intelligence already is superior to natural stupidity
Yes, the .NET framework DOES sometimes malfunction and do strange things. But I have to agree with VT that it's much more common in C++.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
-
When i was beggining to make some programs i had to make a small ellectronic book in c++. It started ok, i managed to make a reader and an editor and then came the worst error a programmer can have. When I compiled the program it went smoothly but when i openned it from windows it showed and internal error message whit no message. I suspected it was an I/O error because when i copied the program to c: or d: didnt showed the error but when i placed in other folder that wasnt the root it showed the error message
If you wanted to teach a monkey how to code you wouldn't use C/C++. You'd use VB or C# ;P
-
Everybody hold on one minute and take a deep breath. True: the HoS is not for questions. So look closely at the title of this thread and the original post. Vasily did not ask a question, he told a story from long ago (C++ builder 6 came out in 2002) when he was "beginning to make some programs" and ended up hating C++. He was not asking for help, and he reasonably responded to unsolicited advice by reasserting his reasons for hating C++. You may not share or understand the bad taste the experience left in his mouth, but do not slam his competence (he was a beginner ten years ago, remember?) and drag him into a screaming match then bitch-slap him for getting frusterated. Get a GRIP. Now... I learned to program as a kid in the early 80's and was good at it until I tried to learn OOP and windows programming simultaneously without a teacher, using Borland OWL on Win3.1. With no internet. The documentation was...terse. My code was corrupting the bitmaps used for drawing the minimize/maximize/close buttons. My code crashed. Then my code crashed WINDOWS and dumped out to the command prompt. Not kidding. Bad taste in mouth. For Windows, lParam, wParam, C++, Borland, the whole mess. It was definately HoS experience. I still hate C++ on a deep emotional level that will not be mollified by any appeal to reason. Today I program command line apps in ANSI C and couldn't be happier.
great, at least someone got my message, a lot of great programmers had their bad days with c++ at least i was lucky to live in a time were you have plenty other options, i was only geting out an old frustration and everyone that didnt had a bad time with c++ cant call himself a good programmer
exegetor wrote:
I still hate C++ on a deep emotional level that will not be mollified by any appeal to reason.
I really enjoyed that quote it made me laught
-
I have never had a problem haunt me for weeks. Post your code here for review. I'm certain I could fix it in a few minutes. I can write C# code that would haunt you for weeks. As far a feeling alone. I'm certain that you are not alone. I work with other engineers who are stuck a Perl. When they try Python or C#, there are too many problems to solve. They will tell you that Perl is easy and doesn't have any problems. Take an assembly language class. I think it will illuminate just what computers do.
I am an informatic engineer i do know how computers work, and I have made several programs in asm
-
I promise you that you surely don't know what you are talking about. The symptom you are describing is an operating system issue. You are: step one - missing dlls. C++ Builder will alter the environment variables to account for any dlls you are dependent on. step two - when your code is in the wild, it needs the dependent dlls. That includes any dlls that you have written and the C++ Builder C/C++ runtime dlls. step three - if you were using Visual Studio, you would need to install vcredist when running wild. step four - Java, C#, Python... all have their issue that correspond to this one. step five - Don't post here and ask for help and then argue with the people who are trying to help you. You come off arrogant and based on your first post, you don't have the right to be that arrogant. If you hate C++, try C#. If you know C#, stick with C#. Just know that you won't be able to do anything outside the sandbox.
I have seen a lot of guys here that doesnt have a clue of what they are talking about. C# its not a sandbox, after passsing an enormous amount of time porting C lines to C# (ak NEHE lessons to my game engine) i realized that there are almost anything that c\c++ can do that c# doesnt you can use pointers(althought not encouraged) you can system make dll calls, working with data streams is a wonder, if you havent tryed try it. The only thing is that you lose control not in doing a task you lose control in how is done. Just tell me one thing that c/c++ can do that c# dont(please dont tell me inline asm)
-
a price that you wont notice on core i processors
Do you only develop for yourself? Saying that performance is fine on YOUR computer doesn't mean it's good for your users. Also, no I've never been stuck for weeks on a problem with C++ code... I've been stuck getting libraries to work (opengl, sfml, etc) but I know how to properly debug... In fact if you are hiding behind C# instead of learning to debug with unmanged languages, you are hurting yourself in the long run... Those skills are relevent in all languages and will help you the next time C# throws you a fancy error message that you can't make heads or tales of.
-
I have seen a lot of guys here that doesnt have a clue of what they are talking about. C# its not a sandbox, after passsing an enormous amount of time porting C lines to C# (ak NEHE lessons to my game engine) i realized that there are almost anything that c\c++ can do that c# doesnt you can use pointers(althought not encouraged) you can system make dll calls, working with data streams is a wonder, if you havent tryed try it. The only thing is that you lose control not in doing a task you lose control in how is done. Just tell me one thing that c/c++ can do that c# dont(please dont tell me inline asm)
Vasily, by definition, C# is a sandbox. That is what managed code means. You run in a sandbox and don't have access to the process space. Sandbox. Got it? So, you want one thing? Write me a device driver in C#. Another? Write me an HTTP server that can handle 100,000+ simultaneous connections. I can do that in C++ using overlapped IO and completion ports. I hear the same arguments from the Java guys. My Grails on Groovy on Java framework can handle 200 simultaneous connections and it doesn't matter because I can throw more hardware at it. Do you have any idea how many machines you will need to replace the 1 C++ machine? You talk about making system DLL calls. What do you think those DLLs are written in? And, BTW, if you don't have the C/C++ run-times installed, those DLLs will not load either. I gave you the solution to your problem. I use QT. QT's streams are a wonder as well. And you know what, they are a lot faster too. QT and C# with WPF gives you declarative programming. Guess what, C++ and QT are much faster again. Both are equivalently trivial. You allude to an idea that I don't have a clue. Go back and read what I wrote about insulting people when you make a bold statement and then try to argue the point. My guess is you are about 15 years old. You are learning to program and you still have holes in your knowledge. Me, I'm 50 years old. I've been doing this since the Apple II days. I've done mainframe. I can do assembly, PASCAL, PL1, C, C++, C#, Perl, Python, JavaScript, Java, HTML, device drivers, DLLs, servers, clients, OpenSSL, mobile devices, and much more. I can do all this stuff on Windows, Windows CE, MacOSx and Linux. Oh, and BTW, you can't do inline ASM. M
-
Vasily, by definition, C# is a sandbox. That is what managed code means. You run in a sandbox and don't have access to the process space. Sandbox. Got it? So, you want one thing? Write me a device driver in C#. Another? Write me an HTTP server that can handle 100,000+ simultaneous connections. I can do that in C++ using overlapped IO and completion ports. I hear the same arguments from the Java guys. My Grails on Groovy on Java framework can handle 200 simultaneous connections and it doesn't matter because I can throw more hardware at it. Do you have any idea how many machines you will need to replace the 1 C++ machine? You talk about making system DLL calls. What do you think those DLLs are written in? And, BTW, if you don't have the C/C++ run-times installed, those DLLs will not load either. I gave you the solution to your problem. I use QT. QT's streams are a wonder as well. And you know what, they are a lot faster too. QT and C# with WPF gives you declarative programming. Guess what, C++ and QT are much faster again. Both are equivalently trivial. You allude to an idea that I don't have a clue. Go back and read what I wrote about insulting people when you make a bold statement and then try to argue the point. My guess is you are about 15 years old. You are learning to program and you still have holes in your knowledge. Me, I'm 50 years old. I've been doing this since the Apple II days. I've done mainframe. I can do assembly, PASCAL, PL1, C, C++, C#, Perl, Python, JavaScript, Java, HTML, device drivers, DLLs, servers, clients, OpenSSL, mobile devices, and much more. I can do all this stuff on Windows, Windows CE, MacOSx and Linux. Oh, and BTW, you can't do inline ASM. M
I stand corrected. You are older and not 15.
-
Step 7a: Read the code and try to locate the problem by analysis Step 7b: (only if 7a fails) Try to shorten the code to rule out as much of it as possible as source of the problem Step 7c: Identify potentially problematic code in what is left over and monitor it by logging Step 7d: Draw conclusions from the logged values, go back to 7b if the results are not conclusive Step 8: Fix the problem Step 9: Restore all the code that has been commented out during troubleshooting And now repeat 500 times 'I WILL NOT SHOUT AT THOSE WHO TRY TO HELP ME'. Edit: And there is also the tiny possibility that the compiler is a little antiquated and has a little problem with newer windows versions. Edit^2: Borland C++ Builder is from 2002. 10 years old, meaning it's probably a rare item in computer museums :)
At least artificial intelligence already is superior to natural stupidity
http://fbe.am/5JO[^] here is the software i found it i will give a million dollar to the brainy to tell me whats wrong
-
I have seen a lot of guys here that doesnt have a clue of what they are talking about. C# its not a sandbox, after passsing an enormous amount of time porting C lines to C# (ak NEHE lessons to my game engine) i realized that there are almost anything that c\c++ can do that c# doesnt you can use pointers(althought not encouraged) you can system make dll calls, working with data streams is a wonder, if you havent tryed try it. The only thing is that you lose control not in doing a task you lose control in how is done. Just tell me one thing that c/c++ can do that c# dont(please dont tell me inline asm)
Vasily Tserekh wrote:
please dont tell me inline asm
Why not? The ability to take control of the generated code locally and without having cumbersome calling conventions or even Win32 Interop wrappers or any marshalling of data types allows very precise and effective optimizations. I know you think that processors are fast enough now, but that's a very strange thing to hear from somebody who wants to write game engines. Anyway, there are also far more limited devices, like microcontrollers, where you cannot afford to be wasteful or the comfort you are so much accustomed to. What next? Oh, yes, C++ includes C. That allows to simply forget about OOP. I know, the Guru you have learned from now has a heart attack and you are probably about to faint, but that actually can be a good thing. It makes the generated code smaller and the additional performance overhead for objects is also eliminated. Again, this is a blessing when you are working on slower devices. If you must you can do that, C# will never allow you to go there. But that's ok, because those devices often would not be able to host the .Net framework anyway. Has the Guru recovered yet? Ok, let's have some multiple inheritance in C++ then. I can inherit from several baseclasses? Oh yes, that can be problematic, but it's really helpful when you know what you are doing. And spare me a lecture about interfaces. An interface is nothing more than a purely abstract baseclass and I have to implement it separately when several classes inherit from it. And that very quickly leads to one of my oldest enemies called redundancy. Once again, C# will not allow you to do something because some guy at Microsoft considered all of us too dumb to use it correctly. Now let's finish the poor Guru off, shall we? While it's not quite so bad as with those Java guys whose religion obviously forbids even thinking of managing memory, but what makes you guys think that entrusting the management of one of the most essential resources in the entire system to some dumb mechanism like a garbage collection is a good idea? That thing takes its share of both memory and the CPU just to find out what might now be freed up. C++ gives you both the privilege and the responsibility to take your object's lifecycle into your own hands. Memory is allocated precisely when you need it and released precisely when you want it to. So, what are you going to do when you have produced a memory leak? That's not quite as impossible as both the Java
-
Vasily, by definition, C# is a sandbox. That is what managed code means. You run in a sandbox and don't have access to the process space. Sandbox. Got it? So, you want one thing? Write me a device driver in C#. Another? Write me an HTTP server that can handle 100,000+ simultaneous connections. I can do that in C++ using overlapped IO and completion ports. I hear the same arguments from the Java guys. My Grails on Groovy on Java framework can handle 200 simultaneous connections and it doesn't matter because I can throw more hardware at it. Do you have any idea how many machines you will need to replace the 1 C++ machine? You talk about making system DLL calls. What do you think those DLLs are written in? And, BTW, if you don't have the C/C++ run-times installed, those DLLs will not load either. I gave you the solution to your problem. I use QT. QT's streams are a wonder as well. And you know what, they are a lot faster too. QT and C# with WPF gives you declarative programming. Guess what, C++ and QT are much faster again. Both are equivalently trivial. You allude to an idea that I don't have a clue. Go back and read what I wrote about insulting people when you make a bold statement and then try to argue the point. My guess is you are about 15 years old. You are learning to program and you still have holes in your knowledge. Me, I'm 50 years old. I've been doing this since the Apple II days. I've done mainframe. I can do assembly, PASCAL, PL1, C, C++, C#, Perl, Python, JavaScript, Java, HTML, device drivers, DLLs, servers, clients, OpenSSL, mobile devices, and much more. I can do all this stuff on Windows, Windows CE, MacOSx and Linux. Oh, and BTW, you can't do inline ASM. M
It is alwayas good a people that have a lot more knowledge and experience than you to shut your mouth. I was not insulting you i just can see how superior is c++ because you can make device drivers on it in that case, i can argue than asm code is superior to c++ because you can make device drivers and its more flexible. and you will tell me that you are not productive with asm, the same thing i tell you with c++ and C# c++ is to computer programming like php for web programming, they are OLD, misconceived, with a lot of patches, modified on the run, the syntax is awfull and yet eveyone says is wonderfull because everything is built on that. That is not an argument at least for me You tell me that c++ code is a lot faster, and I recommend you to read some articles because in a lot of use cases c# is faster. and BTW Inline assembly was a technique that enabled C++ programmers to put I386 assembly language directives into the C++ code. It was a horrible hack that made all kinds of assumptions about the processor (in a portable language?) and was used quite often when something fast and low-level was needed.
-
the ide was c++ builder 6
If it's Builder 6 turn on CodeGuard. Run the application and then look at the code guard log. There's a decent chance it will just tell you what's wrong. It could be as simple as an assumption about paths and/or permissions. It could even be an issue of finding DLL's