Current Events > C++ class Blog topic.

Topic List
Page List: 1
LookANinja
02/01/18 9:15:55 PM
#1:


So the guy brought his loud ass mechanical keyboard to class again.

Professor says we need meaningful comments and variable names in our Homework. Oops.
---
... Copied to Clipboard!
flussence
02/01/18 9:26:30 PM
#2:


you need to outcompete him, get a model 01
---
u
... Copied to Clipboard!
LookANinja
02/01/18 10:29:06 PM
#3:


We're learning about inline functions and overloaded functions. Doesn't seem too bad.
---
... Copied to Clipboard!
3deep5u
02/01/18 10:31:10 PM
#4:


I read like 500 pages of a 1600 page C++ book. Still need to finish it.

There is no C++ class at UCF either.
---
2deep4u
7deep9all
... Copied to Clipboard!
LookANinja
02/01/18 11:24:48 PM
#5:


Oh we finished lecture earlier than usual. Now we're doing lab.
---
... Copied to Clipboard!
KobeSystem
02/01/18 11:27:19 PM
#6:


i remember loving the hell out of my first C++ class. Have fun lmao
---
... Copied to Clipboard!
Johnny_Nutcase
02/01/18 11:30:24 PM
#7:


3deep5u posted...
I read like 500 pages of a 1600 page C++ book. Still need to finish it.

There is no C++ class at UCF either.


Waaaaaat? What a dump college.
---
I've learned that life is one crushing defeat after another... until you just wish Flanders was dead. - Homer Simpson
... Copied to Clipboard!
BewmHedshot
02/01/18 11:30:28 PM
#8:


Ask about SFINAE, TC.
---
Cavaliers: ONCE
... Copied to Clipboard!
AverageCEgal
02/01/18 11:35:24 PM
#9:


he brought a literal mechanical keyboard to type on
... Copied to Clipboard!
3deep5u
02/01/18 11:36:51 PM
#10:


Johnny_Nutcase posted...
Waaaaaat? What a dump college.

It's actually really highly ranked for CS.
---
2deep4u
7deep9all
... Copied to Clipboard!
Johnny_Nutcase
02/01/18 11:38:02 PM
#11:


3deep5u posted...
Johnny_Nutcase posted...
Waaaaaat? What a dump college.

It's actually really highly ranked for CS.


Ranked high by who? UCF?
---
I've learned that life is one crushing defeat after another... until you just wish Flanders was dead. - Homer Simpson
... Copied to Clipboard!
3deep5u
02/01/18 11:47:23 PM
#12:


my professor's ass I guess
---
2deep4u
7deep9all
... Copied to Clipboard!
nexigrams
02/02/18 12:07:28 AM
#13:


C++ at school eh? What is this, 2003? I thought most schools did Java now a days for an OO language.
---
... Copied to Clipboard!
Johnny_Nutcase
02/02/18 12:08:40 AM
#14:


nexigrams posted...
C++ at school eh? What is this, 2003? I thought most schools did Java now a days for an OO language.


Hey everyone this guy knows what year it isn't and he knows that the ONLY valuable programming language is ......hehe java....
---
I've learned that life is one crushing defeat after another... until you just wish Flanders was dead. - Homer Simpson
... Copied to Clipboard!
thisisboris2
02/02/18 12:19:03 AM
#15:


i'm doing C and i am having lots of trouble with linked lists and stacks
---
i dunno why but yall are cray cray coocoo heads
... Copied to Clipboard!
faizan_faizan
02/02/18 12:40:06 AM
#16:


KobeSystem posted...
i remember loving the hell out of my first C++ class. Have fun lmao

I loved all my programming languages because I was always 5-6 chapters ahead of the class. It was fun to know more than the professor, even.
---
Allergic to bull****.
... Copied to Clipboard!
Butterfiles
02/02/18 12:43:34 AM
#17:


thisisboris2 posted...
i'm doing C and i am having lots of trouble with linked lists and stacks

linked lists can be tough but they are importnat for learning other data structures.

what problems are you having with stacks
---
... Copied to Clipboard!
MutantJohn
02/02/18 12:51:19 AM
#18:


No raw new and delete, no raw for loops.
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
darkmaian23
02/02/18 1:01:20 AM
#19:


thisisboris2 posted...
i'm doing C and i am having lots of trouble with linked lists and stacks

Is it just linked lists and stacks, or are you having trouble writing quality C programs beyond a certain size? It's easy to make mistakes: off by one, bad pointer arithmetic, memory leaks. I love the simplicity of C but it ranks as my least favorite to write code in because it is so fiddly.

On topic, it's cool you're learning C++ TC. A lot of CS curriculum shy away from C++ in favor of Java, despite the continued popularity of the language and the huge legacy code bases that most major companies have. I always enjoyed coding in C++, but I could never shake the feeling that I didn't really know the language completely; writing C++ always made me secretly feel like a second-rate coder.

Go has a lot of awkward quirks, but so far I like it better than both C and C++ for small, fairly simple projects.
... Copied to Clipboard!
thisisboris2
02/02/18 3:19:42 AM
#20:


basically actually writing the programs,i can kind of get the logic/ideas behind the lists and stacks but when i try to use them i just can't do anything
---
i dunno why but yall are cray cray coocoo heads
... Copied to Clipboard!
LookANinja
02/02/18 2:23:32 PM
#21:


I gotta remember to post my homework assignment here when the teacher has it up for us to submit.

I finished it, and it works, but i like the feedback.
---
... Copied to Clipboard!
TheAnthraxBunny
02/02/18 3:16:28 PM
#22:


I'm getting pretty good with Python and I've thought about moving onto something harder just for fun. Probably C. But idk if it's overly useful for web development and data science, which is what I'm most interested in.
---
Syrobonkus!
... Copied to Clipboard!
LookANinja
02/02/18 5:08:13 PM
#23:


Damn teacher still hasn't put up the study guide for the exam next week nor opened up the homework for submissions.
---
... Copied to Clipboard!
3deep5u
02/02/18 7:02:23 PM
#24:


TheAnthraxBunny posted...
I'm getting pretty good with Python and I've thought about moving onto something harder just for fun. Probably C. But idk if it's overly useful for web development and data science, which is what I'm most interested in.

If you want to learn data science stick with Python or R.

Web dev: JavaScript, C#, PHP
---
2deep4u
7deep9all
... Copied to Clipboard!
MutantJohn
02/02/18 8:12:11 PM
#25:


^ C++ is actually getting a lot of support for good HTTP libs.

I always enjoyed coding in C++, but I could never shake the feeling that I didn't really know the language completely; writing C++ always made me secretly feel like a second-rate coder.


The upper echelons of the language can be insane. But the secret is to take it in chunks and understand that C++ takes years to learn and can never be fully mastered by any one individual.
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
MutantJohn
02/04/18 1:50:00 AM
#28:


Lol what's up with all the deleted messages?
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
LookANinja
02/04/18 3:32:28 AM
#29:


... Copied to Clipboard!
MutantJohn
02/04/18 10:56:35 AM
#30:


Btw, if you ever wanna "git gud" at C++, join the cpplang slack team. It's full of some of the best C++ coders around.
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
TheAnthraxBunny
02/04/18 5:02:51 PM
#31:


3deep5u posted...
TheAnthraxBunny posted...
I'm getting pretty good with Python and I've thought about moving onto something harder just for fun. Probably C. But idk if it's overly useful for web development and data science, which is what I'm most interested in.

If you want to learn data science stick with Python or R.

Web dev: JavaScript, C#, PHP

Why would you use PHP instead of Django or Ruby on Rails?

MutantJohn posted...
Lol what's up with all the deleted messages?

The mobile website was acting really weird for me yesterday. It was only posting parts of my message.
---
Syrobonkus!
... Copied to Clipboard!
kirbymuncher
02/04/18 5:04:41 PM
#32:


TheAnthraxBunny posted...
Why would you use PHP instead of Django or Ruby on Rails?

because php is a popular thing

it's less because you'd want to use it and more because other people would make you use it
---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
MutantJohn
02/04/18 11:43:46 PM
#33:


Ruby on Rails is honestly terrible.
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
LookANinja
02/05/18 6:29:08 PM
#34:


Alright guys heres the homework assignments for the week.

Write a program that prompts the user to enter integers, floats, and strings and displays the results of 'adding' them by calling an overloaded function called 'add'.

- main()

- prompt the user for 2 integers

- call the add() function

- display the result

- prompt the user for 2 floats

- call the add() function

- display the result

- prompt the user for 2 strings

- call the add() function

- display the result (concatenate)

- overloaded add functions

- one function to handle integers, one for floats, one for strings

- use the '+' operator with the 2 arguments passed in as operands

Note: The '+' operator is a valid operator for two strings as operands. The result is the

concatenation of the two strings.


And here's the second problem. I have them both solved on my laptop.

- a function template for the function add (HW 3.2)

- in main() use the function template by calling the add() function with

- integers

- floats

- strings

No user entry is required, test values can be hardcoded.

Display the test values and the result after calling the function.

*** Note: Strings have to be variables and cannot be string literals.

---
... Copied to Clipboard!
LookANinja
02/05/18 6:32:03 PM
#35:


My solution for problem 1.

//Using an overloaded function for different types of inputs and outputs
#include<iostream>
#include<string>
using namespace std;

int add(int x,int y)
{
return x+y;
}
float add(float f,float g)//function with same name has different parameters
{
return f+g;
}
string add(string s1, string s2)
{
return s1+s2;
}
int main()
{
int x,y;
float f,g;
string s1,s2;
cout<<"Enter two integers"<<endl;
cin>>x>>y;
cout<<add(x,y)<<endl;
cout<<"Enter two floats"<<endl;
cin>>f>>g;
cout<<add(f,g)<<endl;//function of same name with different output types
cout<<"Enter two strings";
cin>>s1>>s2;
cout<<add(s1,s2);
}

And heres problem 2

//Creating function template for add to find the sum of two ints, floats, and strings
#include<iostream>
#include<string>
using namespace std;

template<typename T>
T add(T x,T y)//template parameter list
{
return x+y;
}

int main()
{

int x=3,y=4;
float f1=3.2,f2=3.3;
string st1="duck",st2="bill";
add(x,y);//function is called
cout<<x<<" + "<<y<<" = "<<add(x,y)<<endl;//test values are displayed along with function
add(f1,f2);
cout<<f1<<" + "<<f2<<" = "<<add(f1,f2)<<endl;
add(st1,st2);
cout<<st1<<" + "<<st2<<" = "<<add(st1,st2);

}

thoughts anyone?
---
... Copied to Clipboard!
LookANinja
02/05/18 6:33:18 PM
#36:


And finally the study guide for exam 1 on thursday.

These are the concepts that you should be familiar with for Exam #1.

Preprocessor directives:

- #include <iostream>

- #include <iomanip>

- #include <string>

Namespace:

- how to make objects from the std namespace available

I/O streams:
- cout

- default device its associated with

- default justification

- default precision
- cin

- default device its associated with
- << (stream insertion operator)

- stream it's used in conjunction with
- >> (stream extraction operator)

- stream it's used in conjunction with

- limitations in terms of strings

- how it handles white space

Manipulators (what they do, parameterized , single-use or persistent):
- endl
- fixed
- left
- right
- setprecision
- setw

Functions and methods used on/with streams:
- getline()

- cin.getline()

- cin.ignore()

- when is this used?

Variables:

- definition of different types

- normal, pointer, reference

- what is necessary when defining a variable that is a reference

- scope

Control structures:

- if and if / else statement

- while loop

- do while loop

- for loop

Operators (relational, equality, assignment, etc.)

Functions:

- Declaration

- function prototypes

- Definition

- the actual function code

- Calling / invoking
- Argument passing

- different methods

- by value

- by pointer/address

- by reference
- Inline

- what makes a good candidate for an inline function

- Overloading

- how the compiler checks the validity of an overloaded function

- Default parameter values

- what condition must be met when these are used?

- Templates

- syntax

- benefits of using them
---
... Copied to Clipboard!
MutantJohn
02/05/18 7:49:49 PM
#37:


Download Catch and write some unit tests.
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
LookANinja
02/05/18 10:02:16 PM
#38:


... Copied to Clipboard!
MutantJohn
02/06/18 12:34:46 AM
#39:


I'm sure it's okay.


That depends, did you download https://github.com/catchorg/Catch2 and then use it to write a series of unit tests testing the functionality of your code?
---
"Oh, my mother; oh, my friends, ask the angels, will I ever see heaven again?" - Laura Marling
... Copied to Clipboard!
Topic List
Page List: 1