Code Blocks keeps telling me there's an error on line 16, "Expected declaration before ' } ' token" in Birthday.cpp, but there's no line 16 in my code. :(
It took me a good hour to understand these two tutorials, mostly because there was a lot to think about and I'm quite slow. I found writing detailed informational comments by my code telling me what I was doing and why essentially seared it into my head =D now I remember and understand everything!
Thanks Bucky! In 10 years time, when people ask me "who taught you to be such an amazing programmer?!" I'll answer: "Bucky Roberts of thenewboston"
Only had one error, accidently put <, instead of << Haha :) works perfectly other than that. Been wondering how to use multiple classes, nice one Bucky!
Am I the only one that get's an error?!! Always in the Birthday.cpp class it says "Birthday.h: No such file or directory" and "ISO C++ forbids declaration of 'Birthday' with no type.
@Chriscs7 oh i realised what the problem was. You have to include all the #ifndef #endif nonsense, so it should look identical to what Bucky's got. I think he said in another tutorial its not important but it actually is!
@Olemassacre in the .h file you have all your functions. In cpp you have your functions coded. You include stuff in .h when you need it, like strings. You do not need to include namespace std because you do not use cin or cout there. You use them in the .cpp file. or that's how I got it. lol
I'm confused as to where to put the include statements for things like iostream when dealing with classes.. for example when I'm including iostream - do I put it only in the cpp file, only in the header file, in both files(?)
this include stuff is very repetitive and if a class changed in name it would be a pain in the ass to change all the includes, there must be another way to go about this, i'm coming from java/php and this is simple ridicules.
@Cezarijus Actually, there is a way. All you need to do, is pack all the headers into one header called "Library.h" for example and include that into every file. Then, if you need to change the name of something, just change it in the Library header, not in each and every file. It is the easiest way :) Very efficient. This can be used for all kinds of libraries, global variables, namespaces and so on.
@Friedtunafish77 wouldn't that make you iinclude headers that you don't necessarily need? or it doesn't matter if you include a header file and don't use it?
in Birthday.cpp you can also declare your stuff using the ":" Symbol. i did it like this.
:month(m), day(d), year(y)
kidharris55 20 hours ago
Can you define new objects in parameters like java? So instead of defining your birthday object in it's own line write it in the parameter:
People BuckyRoberts("Bucky the king" , Birthday birthday(12, 26, 1986));
sinnombre040 2 weeks ago in playlist C++ Programming Tutorials Playlist
A little bit confusing, but i bet it just need some time to lay into my brain :)
orfmor 3 weeks ago
debugging = no fun
KristopherSw 1 month ago
@thenewboston dang your birthday was 2 days ago.... I knew I should have watched this tutorial earlier
KrazyMexicanm 2 months ago in playlist Buckys C++ Programming Tutorials Playlist
Code Blocks keeps telling me there's an error on line 16, "Expected declaration before ' } ' token" in Birthday.cpp, but there's no line 16 in my code. :(
realrich46 2 months ago
This has been flagged as spam show
Happy birthday Bucky !
GoConfuseD 2 months ago in playlist Buckys C++ Programming Tutorials Playlist
I just tried to run this with Visual Studio and it threw like 40 errors
LaughingShinoo 2 months ago
Awesome! Keep it up! Thanks from Kazakhstan!
abekmuratov 2 months ago
my.....mind.....just.....exploded
2pimpinout 2 months ago
Great tutorial but it feels as though the idea of passing an object and how it works was not clarified enough...
Octayne93 3 months ago
Why we never use the cin function -__-
dbzking00 3 months ago in playlist Buckys C++ Programming Tutorials Playlist 2
:D:D:D...
first time bucky had to upload part 2 for a tutorial..
eminemNVevo 3 months ago
it gives me undefined reference error :(
forexJobs 4 months ago
@forexJobs make sure all files are included in the project. I had the same issue.
coolzidedown 3 months ago
@coolzidedown i have got it solved :) i have added all the definitions in header file. and deleted cpp files, accept main function cpp:)
forexJobs 3 months ago
at last after 24 h ours i got it!!!!!!!!!!!!!
mjdhiru 4 months ago
Comment removed
enerzizer 4 months ago
It took me a good hour to understand these two tutorials, mostly because there was a lot to think about and I'm quite slow. I found writing detailed informational comments by my code telling me what I was doing and why essentially seared it into my head =D now I remember and understand everything!
Thanks Bucky! In 10 years time, when people ask me "who taught you to be such an amazing programmer?!" I'll answer: "Bucky Roberts of thenewboston"
=)
Nevanification 5 months ago 4
^^ java/php ? library.h ? this is not intepreter language ?
mrsgen 5 months ago in playlist The New Boston c++
i can do it just with cout << "bucky the king was born in 12/28/1986"; XD
nicola9740 5 months ago
Hi Bucky- what are you using for a compiler?- I keep gettind an error message concerning the call of the Birthday class from the Person class
("in member function Person::PrintInfo,void value not ignored as it shoul be..??)
MrLowesc 6 months ago
Aaargh! This was really confusing. :| What's weird is that I don't wanna go through it again, either! :S
Arihant65 6 months ago
500+ people watched the first but not the second lul
Sutarelecs 6 months ago
@Sutarelecs It could be because people review the first one.
PineCleanDog 5 months ago
This is getting harder lol. I gotta go back to old tuts. Everything looks fuzzy when it's coming together.
DeuceisLegit 6 months ago
bucky was born dec 28,1986 lol
SuperAvailable123 7 months ago
a class inside of another class? Clanception.
mikeduels 7 months ago
COMPLICATED!
eminemchu43 7 months ago
This has been flagged as spam show
PRETTY COOL HUH?
eminemchu43 7 months ago
Only had one error, accidently put <, instead of << Haha :) works perfectly other than that. Been wondering how to use multiple classes, nice one Bucky!
kooltom1 8 months ago
Am I the only one that get's an error?!! Always in the Birthday.cpp class it says "Birthday.h: No such file or directory" and "ISO C++ forbids declaration of 'Birthday' with no type.
SOMEONE PLEASE HELP ME!
Lunaticpandora101 9 months ago
@Lunaticpandora101 SAME ERROR HERE TOO!
Chriscs7 8 months ago
@Chriscs7 oh i realised what the problem was. You have to include all the #ifndef #endif nonsense, so it should look identical to what Bucky's got. I think he said in another tutorial its not important but it actually is!
Lunaticpandora101 8 months ago
Holy crap I actually got it to work after fixing only 5 errors!!!! Yes!!!!!!!!!!
DjZephy 9 months ago
this was the most confusing shit. plus, i garuntee ill never use this ever
preymouth 9 months ago
CLASSES IS SOOOOOOOOOOOOOOO FUCKIN COMFUSING arrrrgghhh, :)
SuperHappyvideo 9 months ago
@SuperHappyvideo Yepp... The .h file and .cpp... What's the difference?
Olemassacre 9 months ago
@Olemassacre in the .h file you have all your functions. In cpp you have your functions coded. You include stuff in .h when you need it, like strings. You do not need to include namespace std because you do not use cin or cout there. You use them in the .cpp file. or that's how I got it. lol
sergyu123456 9 months ago
@sergyu123456 Well... It's still confuseing me.
Olemassacre 9 months ago
@Olemassacre The header files remind me of Interfaces in java.
TheArcobaleno 9 months ago
@TheArcobaleno I do not have much experience with Java.
Olemassacre 9 months ago
I'm confused as to where to put the include statements for things like iostream when dealing with classes.. for example when I'm including iostream - do I put it only in the cpp file, only in the header file, in both files(?)
gokiburi666 10 months ago
You dont need to include Birthday.h in the People.cpp file since you already included it in People.h and you included People.h in People.cpp
:p
Fjerdue 10 months ago
This has been flagged as spam show
hi bucky,
u never reply to me, now i have decided to post this comment on ur channel and videos everyday until you reply.
PLS MAKE AUTOCAD 2010 TUTORIALS, I am not able to learn it frm the crappy books.
HELP MEEEEEEEEEEEE BUCKYYYYYYYYYY !!!!!!!!!!!!!
sahildave1991 10 months ago
this include stuff is very repetitive and if a class changed in name it would be a pain in the ass to change all the includes, there must be another way to go about this, i'm coming from java/php and this is simple ridicules.
Cezarijus 10 months ago 10
@Cezarijus Actually, there is a way. All you need to do, is pack all the headers into one header called "Library.h" for example and include that into every file. Then, if you need to change the name of something, just change it in the Library header, not in each and every file. It is the easiest way :) Very efficient. This can be used for all kinds of libraries, global variables, namespaces and so on.
Friedtunafish77 10 months ago 18
@Friedtunafish77 wouldn't that make you iinclude headers that you don't necessarily need? or it doesn't matter if you include a header file and don't use it?
cubito455 1 month ago in playlist Buckys C++ Programming Tutorials Playlist
from 1:57 to 6:45 I was yelling at you in my head that you were forgetting to include the parameters in the constructor
Zwolf11 10 months ago 5
@Zwolf11 Same!!! Hahaha!
tuntuni1000 10 months ago