![]() |
| | #16 |
| DESTINY Join Date: Jul 2008 Location: in front of my computer
Posts: 656
| Might be because it's an old compiler.
__________________ HOPE YOU UNDERSTAND....... for( ; ; ) printf("If you can't make it good, at least make it look good"); PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D. IDE- Microsoft Visual Studio 2008 Express Edition |
| BEN10 is offline | |
| | #17 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,359
| Quote:
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is online now | |
| | #18 | ||
| Registered User Join Date: Sep 2006
Posts: 2,511
| Quote:
I mean the compiler is able to run through it's work, and create an executable file, without warnings or errors. Turbo C has a smart compiler which is able to include strlen() functionality, into a program, despite not explicitly including string.h. The resulting program runs correctly. Some sample output appropriate for July 4th: Quote:
| ||
| Adak is offline | |
| | #19 | ||
| DESTINY Join Date: Jul 2008 Location: in front of my computer
Posts: 656
| Quote:
And by the way is anything between double quotes a string literal? Quote:
C-FAQ
__________________ HOPE YOU UNDERSTAND....... for( ; ; ) printf("If you can't make it good, at least make it look good"); PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D. IDE- Microsoft Visual Studio 2008 Express Edition | ||
| BEN10 is offline | |
| | #20 | |
| DESTINY Join Date: Jul 2008 Location: in front of my computer
Posts: 656
| Quote:
) I made 3 solutions of this question. But in all of them the main thing is that I'm swapping the characters of each string until the mid-character. Out of the three approaches I took one of them was with malloc which is similar to your code posted. But I dont understand what you're trying to do in the colored lines. What I've done is after assigning the storage to p, copied a into p and then the same swapping thing. This way the swapped string gets stored in p.
__________________ HOPE YOU UNDERSTAND....... for( ; ; ) printf("If you can't make it good, at least make it look good"); PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D. IDE- Microsoft Visual Studio 2008 Express Edition | |
| BEN10 is offline | |
| | #21 | ||||
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,359
| Quote:
Quote:
Quote:
Quote:
Code: 1 = 2;
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | ||||
| laserlight is online now | |
| | #22 |
| DESTINY Join Date: Jul 2008 Location: in front of my computer
Posts: 656
| Thanks everybody. Now I think some of the loops in my mind are opening regarding pointers.
__________________ HOPE YOU UNDERSTAND....... for( ; ; ) printf("If you can't make it good, at least make it look good"); PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D. IDE- Microsoft Visual Studio 2008 Express Edition |
| BEN10 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| String issues | The_professor | C++ Programming | 7 | 06-12-2007 09:11 AM |
| Custom String class gives problem with another prog. | I BLcK I | C++ Programming | 1 | 12-18-2006 03:40 AM |
| Classes inheretance problem... | NANO | C++ Programming | 12 | 12-09-2002 03:23 PM |
| creating class, and linking files | JCK | C++ Programming | 12 | 12-08-2002 02:45 PM |
| Warnings, warnings, warnings? | spentdome | C Programming | 25 | 05-27-2002 06:49 PM |