Posts: 2,404
Threads: 153
Joined: Jan 2005
^_^ I've been trying C++,. here and there,. both to go do some now,. or learn some... :wink: .. whis I had the time like back when I learned QB,. :roll: .. at least knowing QB helps in learning C++, or it seems that way to me..
Kevin ( x.t.r.GRAPHICS)
Posts: 602
Threads: 27
Joined: Oct 2004
Quote:NovaProgramming Wrote:Hey everyone I started proggin' with C++ and I don't like it!
$&@*ING SEMICOLONS.
Anyways, other than the semicolons, I'm getting along with it a little bit... I am in like an "intro to C++" class, and I'm zipping through it and trying to make my programs more complicated and better than the next guys. It's boring though, and I *Still* like Qbasic better... cause I can do the same things we're doing now in C++ WAY easier in QBasic...
Yup. Anyone else had any experience with C++ and whatnot?
obviously its going to be a lot easier to do anything in QB than in C++.. thats not the point of C++... the point is so that you have more options of how to do things... QB makes it simple, but yet yuou dont have as many options. for example, look at the whitespace/semicolon option in the compiler/ide if c++ vs qb... if you forget a semicolon in c++, your prog wont work. but because of trhem, you can have an entire 30kb prog on one entire line. can qb do that? nope... because qb uses the cr/lf/null to end a statement vs the ; see?
wait. you... no you don't really tell me that's the difference between qbasic and c++ do you? i mean no... you can't be serious about that can you?
btw, show me where it's easier to do:
+ a linked list
+ an n-tree
+ generic programming
quote="NecrosIhsan"]
[/quote]
Posts: 1,272
Threads: 36
Joined: Feb 2003
Are they teaching strings using the std::string class, or using char* strings?
Posts: 938
Threads: 104
Joined: Dec 2002
well he did teach us somewhat about the CHAR statement or whatever the heck, but he says that it's pointless because you can only have one character in it at a time, and it's useless until we get into arrays.
AS for right now, all we really know is
CIN
COUT
FLOAT
INT
SHORT
DOUBLE
ENDL
GETLINE (I still don't get this one)
other than that, we haven't done anything. All the programs are retarted: "Enter name. Enter age. Your name is <name> and you are <age> years old!" Whoopie.
ovaProgramming.
One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.
Quote: Excellent. Now you can have things without paying for them.
BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it .
-----------------------------
Posts: 1,813
Threads: 284
Joined: Mar 2003
cin and cout are bad, dont use them. dont remember why though...
also, dont use cap. letters for commands.
earn.
Posts: 1,272
Threads: 36
Joined: Feb 2003
Quote:cin and cout are bad, dont use them. dont remember why though...
Yeah, it's because they seriously bloat the program. 1 MB (with cout) vs 50 KB (with printf).
Posts: 729
Threads: 104
Joined: Jan 2003
Quote: if you forget a semicolon in c++, your prog wont work. but because of trhem, you can have an entire 30kb prog on one entire line. can qb do that? nope... because qb uses the cr/lf/null to end a statement vs the ; see?
Print "I think you're wrong":if seph = wrong then print "Yes, you're wrong. "
Posts: 1,813
Threads: 284
Joined: Mar 2003
yeah? try adding full if/elseif/then statements and for/next loops...
earn.
lol...
Code: screen 18:type chopinteger field = 1:left as UShort:right as UShort:end Type:type BMPFileInfo field = 1:BIid as Short:BIfilesize as Long:BIreserved as Short:BIreserved2 as Short:BIoffset as Long:end Type:type BMPHeaderInfo field = 1:BIheadersize as Long:BIwidth as Integer:BIheight as Integer:BIplanes as Short:BIbpp as Short:BIcompressionfactor as Long:BIimagesize as Long:BIpelwidth as Long:BIpelheight as Long:BIcolorused as Long:BIimportantcolors as Long:end Type:type RGBQuad field = 1:blue as UShort:green as UShort:red as UShort:end Type:dim fileheader as BMPFileInfo:dim infoheader as BMPHeaderInfo:dim colors(255) as RGBQuad:dim pixelint as chopinteger:dim rgbbloc as chopinteger:dim grabpixels as UShort:dim rgbhold as UInteger:xdifferential = 0:ydifferential = 0:open command$ for binary as #1:get #1,, fileheader:get #1,, infoheader:dim picarray(4 + (infoheader.BIwidth * infoheader.BIheight)) as UShort:for grabcolors = 0 to 255:get #1,, rgbbloc.left:get #1,, rgbbloc.right:colors(grabcolors).red = (rgbbloc.left and 255) \ 4:colors(grabcolors).green = (rgbbloc.left shr 8 ) \ 4:colors(grabcolors).blue = (rgbbloc.right and 255) \ 4: palette grabcolors, rgb(colors(grabcolors).red, colors(grabcolors).green, colors(grabcolors).blue):Next:for y = (infoheader.BIheight) to 1 step -1:for x = 1 to ((infoheader.BIwidth) \ 2):get #1,, grabpixels:pixelint.left = grabpixels and 255:pixelint.right = grabpixels shr 8:pset((x * 2) - 1 + xdifferential,(y - 1) + ydifferential), pixelint.left:pset((x * 2) + xdifferential,(y - 1) + ydifferential), pixelint.right:Next:Next:close #1:sleep
fb, compile it, then drag a 256 color bmp on it
Posts: 3,288
Threads: 167
Joined: Nov 2001
Quote:seph Wrote:cin and cout are bad, dont use them. dont remember why though...
Yeah, it's because they seriously bloat the program. 1 MB (with cout) vs 50 KB (with printf).
What?! damn!!!
Code: cout << "cout suxxors!!!" << endl;
|