C++ Is So Hard!!!

This is a discussion on C++ Is So Hard!!! within the C++ Programming forums, part of the General Programming Boards category; Thanks guys. You see, I get discouraged, and then I lay off it for some time. The most has been ...

  1. #16
    Registered User
    Join Date
    Mar 2006
    Posts
    19
    Thanks guys. You see, I get discouraged, and then I lay off it for some time. The most has been bout...a week during finals at my high school. But then, whenever I think about it, I just WANT to program. I currently don't have a computer that can program. The one I'm using now isn't mine, and I don't have the chance to be on this one as much as I want to. But, do you think just by reading the book C++ Primer and just thinking about the code, would it be helpful?

    -Kai

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,636
    But, do you think just by reading the book C++ Primer and just thinking about the code, would it be helpful?
    If that is all you can do due to resource constraints, then yes. But it will be better (and fun) to write the programs out, compile and run them.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #18
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    I read about C++ for months, and I didn't get a thing. After I installed Dev-C++ and started getting some real experience, I had pretty much mastered the whole book in barely a week.

    If Tiger Woods didn't have clubs, or Elvis didn't have a mike, when they were young, we probably will never have heard of them. In every field, practice makes perfect.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  4. #19
    Registered User
    Join Date
    Mar 2006
    Posts
    19
    I have a question. In the book, it's talking about rules for Integer Literals. And it says that the value 20 can be written in three ways:

    20
    024
    0x14

    How does that work..?

    If anyone has the book, please explain to me Section 2.2. It goes straight over my head.

    -Kai
    Last edited by Kaidao; 06-07-2006 at 03:37 AM.

  5. #20
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,636
    In the book, it's talking about rules for Integer Literals. And it says that the value 20 can be written in three ways:
    20 -> twenty in decimal
    024 -> twenty in octal
    0x14 -> twenty in hexadecimal

    You can easily search the Web for an explanation of number bases. You may even have a scientific calculator that can do the conversion for you, and you may have a calculator program on your computer with such functionality. If not, you can write one yourself (but you dont have a compiler?).
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #21
    Registered User
    Join Date
    May 2006
    Location
    Troy
    Posts
    14
    If you feel tired of C++, take a break and go look at some other language, like Perl or Python or Scheme (but not PHP). When you go back to C++, you'll feel much more comfortable with it.

    Why not PHP? It has no interesting properties that C++ lacks, while Perl, Python, and Scheme do.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extracting data from a laptop hard drive
    By DavidP in forum Tech Board
    Replies: 6
    Last Post: 06-13-2009, 07:02 AM
  2. Detect SCSI Hard Drive Serial Number
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2006, 06:23 PM
  3. Replies: 2
    Last Post: 07-06-2005, 07:11 PM
  4. Trinary Hard Drive
    By nickname_changed in forum Tech Board
    Replies: 14
    Last Post: 05-13-2005, 10:01 AM
  5. hard drive problems continually increasing
    By DavidP in forum Tech Board
    Replies: 5
    Last Post: 11-21-2002, 09:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21