Who can help me to learn programming c++?

int, float , double ? what are they used for?

2 Likes

I wish I could help you, but I donā€™t particularly like programming, I prefer chess,
in any case I canā€™t help you with that.
I hope somebody else can.
I send you my love,
Erez.
@anon48059102 I do have advice.
Get a book and try to learn from it.
There are websites from which you can download books for free.

2 Likes

If you Google ā€œfree c++ courseā€ thereā€™s a lot of options to investigate.

Like this

5 Likes

Are you new to programming? I would suggest python. Python is being used for introductory courses to learn computer programming and CS. There are tons of resources for python and other languages online. To learn C++, I would get a good book or take a class at your local college. I never studied C++. Itā€™s supposed to be hard. Just my 2 cents. Iā€™m in no way a programmer but I can program basic stuff. For instance, I can write a 100-200 line program in python. Javascript is pretty popular now a days.

Anyways, in python, an int is an integer, a float is a decimal number. I donā€™t know what a double is. Sometimes you want more precision in your calculation so you use a float instead of an integer. Sometimes you want a char instead of a number which is just a string.

2 Likes

Moved to School and Work.

lol lol just kidding.
pm me. I know some C and C++

1 Like

Those are the data types. Int is integer and float and double are numbers that have decimals. You have to initialize your variables before you can use them.

I know C++ and Java. So ask away. YouTube is also a great resource. :sunny:

1 Like

Iā€™m about to learn the basics of java. coded with C++ for 6 months.

1 Like

C++? really? itā€™s basically deprecated by now. learn a newer language like Python.

1 Like

learning any language can be a (cough) fun (cough) challenge for Spooky.

but I did learn Python firstā€¦

2 Likes

Bloodshed c++ development

2 Likes

No habla CS. Canā€™t help. Sorry. But I do know that if you have a valid library card, you can often access very good courses at Lynda.com for free. Itā€™s an awesome website where you can learn lotā€™s of things computer related. Even if you pay for a membership, itā€™s worth it if you actually put in the time to learn.
https://www.lynda.com/

2 Likes

ā€œintā€ is an integer, a whole number, positive or negative. floats are rarely used. theyā€™re low-precision numbers like you used to see on calculators 3.649383428E+28. That sort of thing. doubles donā€™t take up much more memory and offer significantly more precision.

2 Likes

can someone explain me what is basic syntax , and how can i use it

it describes as this

When we consider a C++ program, it can be defined as a collection of objects that communicate via invoking each otherā€™s methods. Let us now briefly look into what do class, object, methods and Instance variables mean.

Object āˆ’ Objects have Properties and Behaviors. Example: A dog has Properties - color, name, breed as well as Behaviors - wagging, barking, eating. An object is an instance of a class.

Class āˆ’ A class can be defined as a template/blueprint that describes the behaviors/states that object of its type support.

Methods āˆ’ A method is basically a behavior. A class can contain many methods. It is in methods where the logics are written, data is manipulated and all the actions are executed.

Instance Variables āˆ’ Each object has its unique set of instance variables. An object's state is created by the values assigned to these instance variables.

can you comment it to me , cuz it would i understand it more, and be more interesting to learn,

THANX

yhese toutorials is so confusing to me :DDD

1 Like

I would try getting ā€œProgramming and Principlesā€ book authored by Bjarne Stroustrup, a guy who helped develop C++.

online tutorials are usually poorly brief and require both internet and a computer. a book rarely needs internet. and book readings donā€™t require a computer, though exercises do.

ā€œProgramming and Principlesā€ is the book that my college used to teach beginning C++ programming to freshmen.

learning the basics, of a programming language, takes time. and thereā€™s always more to learn about a program. so a tutor or teacher would be very helpful.

1 Like

int are for quantities they hold numbers without any decimals
floats store decimals and so can doubles
doubles are more precise than floats but they are a little slower
double hold twice as many digits as floats

2 Likes

i use floats all the time in my videogame because I donā€™t need the precision

1 Like

you use classes to make objects
objects have instance variables that are separate for each object you create
methods are functions or subroutines they are code that you can run and they can return values

Dog dog = new Dog(); //Dog is a class, dog is an object
dog.bark(); //bark is a method
dog.foodbowl = 1f; //refill foodbowl to 100%, foodbowl is an instance variable

3 Likes

It just doesnā€™t make sense to use floats, especially nowadays with 64-bit processors (a double is 8 bytes). Floats are only accurate to six significant digits, which makes them good for things like font sizes, but . . . hell, do what you want. Just donā€™t compare them for equality. I learned that lesson the hard way.

2 Likes

oh snap. nerd fight! :OĀ 

just kiddingā€¦ lol lol lolā€¦

2 Likes

I donā€™t need to compare them for equality. I use them for stuff like 3d models, color values, physics calculations that need to be calculated as fast as possible, screen coordinates, rotations. Iā€™m not using floats to keep track of money. Being .00000001 off here and there is no big deal. As you get more experience with programming you learn to never say never. And all those micromanaging code tips are a load of crap because everybody figures out their own style.

Iā€™ve read people saying never use ā€œiā€ as a variable. Well I use ā€œiā€ as a variable all the time and it works great for me. It always means iteration in my code and I know that. I have my own indentation I use too that keeps my code more compact and on the screen. Iā€™m not scared to use a label when I need one. Another is to make instance variables always private access. Sometimes there is no point in doing that!

2 Likes