Metal Guitarist Forums banner
1 - 15 of 15 Posts

·
Mutes the Meat
Joined
·
10,236 Posts
Discussion Starter · #1 ·
I am loving it so far! The class I am in explains basic programming fundamentals, and seems to be aimed to get the students to think in the right ways to be able to effectively program. We are not even learning a real language in this class! The book we are using is "Extended Prelude to Programming ver. 2" and it attempts to be language neutral by using "pseudocode". I think this is a really cool approach!

Next I will have classes in Java and C++. The extent of my programming knowledge currently is writing simple "input value 1, input value 2, output sum of value" programs. They really don't do much :lol:

Needless to say, I'm excited.

So, programmers! Are there any nice resources that I could use to supplement my learning, or any fun practice problems to solve?
 

·
MG.ORG Irregular
Joined
·
9,747 Posts
Unless you are really good at keeping fairly similar things separate when doing them at the same time I suggest either doing C++ or Java but not both at the same time.
 

·
I like turtles!
Joined
·
722 Posts
Learning to program is an awesome thing to do. It'll teach you to approach problems / tasks differently, think more logically etc. A lot of benefits beyond being able to tell a computer what to do.
 

·
Read Only
Joined
·
3 Posts
Read up on propositional logic.

Programming languages come and go (I'm on my 7th in 18 years), but logic is universal. Once you know how to solve a problem, it's pretty straight forward to program it in any language.
 

·
Registered
Joined
·
4,593 Posts
That the same thing as discrete mathematics? I only went to university for a year and a half, but my programming and discrete mathematics courses were the bomb. Too bad they make you take arts and science and shit though. Fuck rounded education :lol:
 

·
Mutes the Meat
Joined
·
10,236 Posts
Discussion Starter · #7 ·
Jeff, of course they're not teaching us Java and C++ at the same time :lol:

Matt, thanks for that link I'll be sure to check it out.
 

·
Slow Money
Joined
·
14,612 Posts
Propositional logic (and most of anything you learn in a basic discrete math class) is GREAT for a leg up programming.
Also, my advisor and my first CS teachers both consider the following essay EXTREMELY important, although i dont necessarily agree with it entirely, its worth a read. It wont make much sense just starting out, but its nice to have read it and have it come back to you as you learn
http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html
 

·
Mutes the Meat
Joined
·
10,236 Posts
Discussion Starter · #9 ·
Code:
#include <iostream>

int main (void);
using namespace std;

{
    //Begin main module
	cout << "Currency Conversion";
	cout << " ";
	cout << "Please select a currency type.";
	cout << " ";
	cout << "1: Canadian Dollars";
	cout << "2: Mexican Pesos";
	cout << "3: English Pounds";
	cout << "4: Japanese Yen";
	cout << "5: French Francs";
	
	
    
    return 0;
}
I'm getting an error from this little bit of code on line 6. It says "Expected unqualified-id before '{' token.

I have no clue why :scratch:

(btw, I haven't even decided on variables or anything, hence their absence, I'm fucking around with the concepts of modular programming that they're teaching me now.)
 

·
Mutes the Meat
Joined
·
10,236 Posts
Discussion Starter · #10 ·
Code:
#include <iostream>

int main (void);
using namespace std;

{
    //Begin main module
	cout << "Currency Conversion";
	cout << " ";
	cout << "Please select a currency type.";
	cout << " ";
	cout << "1: Canadian Dollars";
	cout << "2: Mexican Pesos";
	cout << "3: English Pounds";
	cout << "4: Japanese Yen";
	cout << "5: French Francs";
	
	
    
    return 0;
}
I'm getting an error from this little bit of code on line 6. It says "Expected unqualified-id before '{' token.

I have no clue why :scratch:

(btw, I haven't even decided on variables or anything, hence their absence, I'm fucking around with the concepts of modular programming that they're teaching me now.)
 

·
I like turtles!
Joined
·
722 Posts
The semi colon after void is the problem I think. You just start the function with { straight away. Should be

using namespace std;
int main(void){
//code
}
 

·
Premium Member
Joined
·
23,428 Posts
Nice!

I learned some Fortran in grad school, so I will never, ever be of any help :lol:
 

·
I don't like it.
Joined
·
11,071 Posts
Code:
#include <iostream>

int main (void);
using namespace std;

{
    //Begin main module
	cout << "Currency Conversion";
	cout << " ";
	cout << "Please select a currency type.";
	cout << " ";
	cout << "1: Canadian Dollars";
	cout << "2: Mexican Pesos";
	cout << "3: English Pounds";
	cout << "4: Japanese Yen";
	cout << "5: French Francs";
	
	
    
    return 0;
}
I'm getting an error from this little bit of code on line 6. It says "Expected unqualified-id before '{' token.

I have no clue why :scratch:

(btw, I haven't even decided on variables or anything, hence their absence, I'm fucking around with the concepts of modular programming that they're teaching me now.)
This is how we're learning to start out in my class:

Code:
#include <iostream>

using namespace std;

void main ()
	{
 

·
Slow Money
Joined
·
14,612 Posts
correct, the semicolon there is finishing off the void main statement, and the computer is then trying to parse the open curlamawhatsit as the beginning of its own statement, not as a step-in for the information within main
 
1 - 15 of 15 Posts
Top