Discuss the C and C++ languages here! Ask programming questions, paste code snippets, talk about your projects, as long as it is C or C++!
Offline
I am working on somehow connecting C++ to Scratch, perhaps modding it a bit.
Offline
Dinoclor wrote:
I still can't figure out how to make anything useful in C.
-_-
well, just keep at it!
Offline
Dinoclor wrote:
Yes, but you can't do anything useful with it which doesn't take forever or has been invented already a thousand times better.
I don't learn to make amazing things that have never been done, i do it to learn and gain experience for the future so i might be able to make those things.
Offline
trinary wrote:
#include<iostream>
using namespace std;
int main()
{
cout<<"Can we post questions here?"<<endl;
return 0;
}
this might have been better:
#include<iostream>
#include<string>
using namespace std;
string answer;
int main()
{
cout<<"Can we post questions here?"<<endl;
cin>>answer;
return 0;
}
My response:
#include<iostream>
using namespace std;
int main()
{
answer = "Yes!";
}
Offline
Be better...
int main(int argc, const char* argv[]){ char languageWar[512] = "C"; printf("%s is better than C++", languageWar); return 0; }
Offline
Samtwheels are you the person from Aeroterra?
If so...
public class trololol{
public static void main(String args[]){
System.out.println("Java does it in many fewer lines of code");
System.out.println("trololololol");
}
}
Sorry, I couldn't resist that. It's 6 lines of code, but it only really needs 5. It's only a gain of 2 lines though, but most of that is unused (brackets and declarations)
ANYWAY, once I finish Java, I'll begin either a language of BASIC or C.
Last edited by 16Skittles (2012-02-17 17:07:06)
Offline
16Skittles wrote:
Samtwheels are you the person from Aeroterra?
If so...
public class trololol{
public static void main(String args[]){
System.out.println("Java does it in many fewer lines of code");
System.out.println("trololololol");
}
}
Sorry, I couldn't resist that. It's 6 lines of code, but it only really needs 5. It's only a gain of 2 lines though, but most of that is unused (brackets and declarations)
ANYWAY, once I finish Java, I'll begin either a language of BASIC or C.
really only needs one.
public class trololol{ public static void main(String args[]){System.out.println("Java does it in many fewer lines of code");System.out.println("trololololol");}}
That's just word wrap. this would compile just fine. Now run away, you leetle javite!
Last edited by samtwheels (2012-02-17 17:18:34)
Offline
samtwheels wrote:
16Skittles wrote:
Samtwheels are you the person from Aeroterra?
If so...
public class trololol{
public static void main(String args[]){
System.out.println("Java does it in many fewer lines of code");
System.out.println("trololololol");
}
}
Sorry, I couldn't resist that. It's 6 lines of code, but it only really needs 5. It's only a gain of 2 lines though, but most of that is unused (brackets and declarations)
ANYWAY, once I finish Java, I'll begin either a language of BASIC or C.really only needs one.
public class trololol{ public static void main(String args[]){System.out.println("Java does it in many fewer lines of code");System.out.println("trololololol");}}
That's just word wrap. this would compile just fine. Now run away, you leetle javite!
Wow, lol. But there is a slight difference between what a computer can understand and what is actually legible to a human programmer.
Offline
int main(int argc, const char* argv[]){ char languageWar[512] = "C"; printf("%s is better than Java", languageWar); return 0; }
Offline
trinary wrote:
<?php
echo "No, PHP is better than C. ";
?>
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Last edited by veggieman001 (2012-02-17 17:59:00)
Offline
veggieman001 wrote:
trinary wrote:
<?php
echo "No, PHP is better than C. ";
?>++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
I'm not going to say the name of that language. It's a bad word.
For some reason this is block code.
Last edited by samtwheels (2012-02-17 18:02:01)
Offline
What are you talking about?
Offline
bobbybee wrote:
What are you talking about?
Well, the language is called brain****
Offline
No wonder I never heard of it...
Offline
samtwheels wrote:
veggieman001 wrote:
trinary wrote:
<?php
echo "No, PHP is better than C. ";
?>++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
I'm not going to say the name of that language. It's a bad word.
For some reason this is block code.
What do you mean?
Offline
trinary wrote:
samtwheels wrote:
veggieman001 wrote:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
I'm not going to say the name of that language. It's a bad word.
For some reason this is block code.What do you mean?
He just said "It's a bad word.". Why would he tell you if he just went out of his way NOT to tell you?
*le sigh*
EDIT: I've used Xcode before.
Last edited by Luke121 (2012-02-17 18:19:53)
Offline
Luke121 wrote:
trinary wrote:
samtwheels wrote:
I'm not going to say the name of that language. It's a bad word.
For some reason this is block code.What do you mean?
He just said "It's a bad word.". Why would he tell you if he just went out of his way NOT to tell you?
*le sigh*
No, I mean why is PHP a bad word?
It's a scripting language...
*doesn't understand*
Offline
trinary wrote:
Luke121 wrote:
trinary wrote:
What do you mean?He just said "It's a bad word.". Why would he tell you if he just went out of his way NOT to tell you?
*le sigh*No, I mean why is PHP a bad word?
It's a scripting language...
*doesn't understand*
We here on the forums have a curious sense of humor; more of a disease actually. You'll get it too, eventually. Then it will be all clear to you.
Offline
PHP isn't a bad word. What veggie wrote is.
Offline
Methinks we should either talk about C or leave. I'll stop posting here for now, but I'll be stopping by once in a while to see if there are any tips when I begin learning C.
Offline