Friday, July 31, 2009

Where can I find free JAVA console?

Like Dev C++

Where can I find free JAVA console?
www.download.com


Socket Programming please help?

Okay Hi


I'm on XP ... I have a Dev C++ compiler





I'm trying to learn socket programming ...but it's difficult


and everything seems to be written for ppl who already are experts











You know when u go





#include %26lt;iostream%26gt;


using namespace std;


#include %26lt; math.h%26gt;





etc ...can someone just sketch me a basic





Hello World sort of program that will work ....





where I can just do





#include%26lt; something.h%26gt;





then





int main()





{





SOCKET CODE








return 0;





}











compile and run it as a .CPP file








?????

Socket Programming please help?
there are many socket tutorials in the web. try to search with google, or codeguru.com, gamedev.net etc.





basically, you have to create a socket, then connect to an IP address and a specific port, then you can send or receive data.





if you want to act as a server, you have to create a socket, bind it to a port and network interface, then "listen" for incoming connections; if a connection comes in, you "accept" it and then can exchange data with the foreign socket.





yes, it's a bit complicated and for experts.


Hello World! Error,I think?

When ever I do the hello world project on the dev-c++ complier


It runs and compiles but no window pops up.


I keep the first source code then make a new one.


Any idea,Iv tried many different Hello World! project codes but non work

Hello World! Error,I think?
try this





#include %26lt;iostream%26gt; // if u see a error try putting this #include %26lt;iostream.h%26gt; for older compiler


using namespace std;





int main(){





cout %26lt;%26lt;" HELLO WORLD" %26lt;%26lt; endl;





system("PAUSE");


return (1);


}








try it again i fixed 1 mistake i made earlier.
Reply:after it compiles and you save it, you have to execute the exe file if i remember correctly.
Reply:Typically a hello world would print out the text on a DOS prompt, but it would immediately close.


To be sure, you need to do the following:





#include %26lt;stdio.h%26gt;


void main(void)


{





printf("\n Hello World");


getchar();


return;


}








Basically, the API


int getchar ( void ); %26lt;cstdio%26gt;


Get character from stdin


Returns the next character from the standard input (stdin).


It is equivalent to getc with stdin as its argument.





The changes above makes your program waits for any key to be pressed by the user (YOU), and will not exit.





Try it!

sympathy flowers

Programming in windows vista?

I am trying to use this computer I purchased yesterday for programming. All the new computer at Best Buy had vista. I am using dev-c++ but it will not run it gives me the this message in the compiler and linker output “g++: installation problem, cannot exec ‘cpp’: no such file or directory”

Programming in windows vista?
dev-cpp hasn't been updated since 2004. Here are some alternatives to it, which work perfectly on vista:


1. codeblocks ( http://www.codeblocks.org/ ) with the latest Mingw compiler ( http://www.mingw.org/download.shtml ). You'll find everything you'll need on the codeblocks wiki and forum on how to install them on windows


2. "Visual" Dev-cpp ( http://wxdsgn.sourceforge.net/ ). I think this is what Dev-cpp will become in the near future.


Anyway codeblocks is awesome. It works with ANY C/C++ compiler you tell it to.


3. Microsoft Visual C++ express edition.
Reply:Try re-installing it. I have Dev-C++ on my Vista computer and it works fine.





Also, there may be a special Vista version of Dev-C++ (I'm not sure though). look on their site again for info about using Dev-C++ with Vista


I keep getting this 11 multiple definition of `main' problem?

its with dev c++ and msvC++ wtf do i do???

I keep getting this 11 multiple definition of `main' problem?
do you have multiple routines called "main"? It sounds like you need to check your routine naming scheme, and rename one or more routines.


I can't seem to create a string type while "using namespace std" in one of my header files.?

First of all, I am a beginner to C++ and have very limited knowledge, so please keep any answers simple as possible. I started a project in Dev-C++ just to put into practice what I learned so far. I have a total of 5 files in this project, but I can't seem to get them to compile. For some reason the 'string' type is not defined in one of my included files, even though I'm "using namespace std" at the top of that file. This file is a header file which contains some global variables and 2 class descriptions. But when I try to compile I get the error message :


'string' does not name a type





Can anyone tell me why I can't use a string type in this file, and how I can fix it. Thanks.

I can't seem to create a string type while "using namespace std" in one of my header files.?
Try using a char array instead. To declare one, do this:





char ArrayName[20];





Replace ArrayName with your variable name, and 20 with the maximum characters you want it to be able to hold. To call it later, you just would use ArrayName (i.e. you don't type the brackets when you call it later).





Also, what's cool with arrays, is that later on you can call just one letter from them, like so:





cout %26lt;%26lt; ArrayName[4];





This would print the 5th character stored in the array. I'm not sure what you need your program to do, but arrays are pretty nifty ^.^





If you need any help with beginner C++, or you would like me to send you some of my old programs (commented to show what each line does), feel free to email me through the link on my profile.
Reply:have you tried using:





#include %26lt;string%26gt;





at the top of your file?


Can OpenGL play music such as MP3? If it can, could you tell me how(or give links)?

I'm using C++ (Dev-C++)

Can OpenGL play music such as MP3? If it can, could you tell me how(or give links)?
OpenGL stands for Open Graphics Library. It does graphics, and graphics only. You can use OpenAL (Open Audio Library) or FMOD to play audio. =)

bridal flowers

Video game design?

I am 15 and i was wondering about video game design. I have Blitz3d which uses BASIC and im attemting to learn C++, I have Dev c++ for that. I think it is all interesting but i want to know how to go about a game carreer? I guess what I mean is like what colledges are good, what computer languages to learn if any for design. And if an insanely good drawying skill is required? I am a very good artist though, just curious. Thanks :)

Video game design?
I've had friends apply to Electronic Arts before, so here's a few things that they look for. Basically, you'll need a degree in Computer Science to get your foot in the door more or less. You'll need to have a good understanding of mathematics. In particular, you should read up on matrix algebra because it's used everywhere in 3D graphics.





They want people who know C/C++ and know libraries like OpenGL.





As far as drawing skills, it depends what part of video game design you want to do. There are many different positions, roles, and skills required for the entire game design process. We have story writers, graphics artists, programmers, project managers, audio engineers, etc. There are definitely positions for people who have no drawing skills at all.





I would recommend going to different video game companies, and look at their job postings to get an idea of what they're looking for. You should also consider colleges which have intern/co-operative education contacts with video game companies.


Why won't y cout if the the "if" statement is true?

c++


using dev-c++


using the following





#include %26lt;iostream.h%26gt;


int main()


{


double x,y;


x=53.26;


y= (x/2) - (.20/2);


if( y == 26.53 )


{


cout %26lt;%26lt; y %26lt;%26lt;endl;


}


return 0;


}





when i do the equation manually y does in fact equal 26.53 but it seems it is not true in the "if" statement. why?

Why won't y cout if the the "if" statement is true?
I think Haley had the best approach here, but not quite there. Somehow i think this is linked as to how the variables are declared.





x=53.26d;


y=(x/2d) - (.20d/2d);





if (y == 26.53){


cout %26lt;%26lt; y %26lt;%26lt; "\n";


}








Try that and see if it works, I haven't compiled it myself. One good debug statement would be adding a


cout %26lt;%26lt; y %26lt;%26lt; endl;


after you set the value for y. It should give you a good idea of what is happening.
Reply:I bet it thinks Y is = to x/2, put ()'s around the entire equations like so....


y= ((x/2)-(.20/2));





HTH!
Reply:Could be rounding error, maybe? I think .1 is one of the numbers computers have a hard time representing and .20/.2 should come out to .1.
Reply:#include %26lt;iostream%26gt;


using namespace std;


int main()


{


double x,y;


x=53.26;


y= ((x/2) - (.20/2));


if( y == 26.529999999999998 )


{


cout %26lt;%26lt; y %26lt;%26lt;endl;


}


system("PAUSE");





}


<sys\ipc.h> missing in Windows XP?

I'm trying to run some code and it says





%26lt;sys\ipc.h%26gt; AND %26lt;sys\sem.h%26gt; are missing...how do I get these files?





I'm using Dev C++ for my C coding......





thanks

%26lt;sys\ipc.h%26gt; missing in Windows XP?
Make sure that the IDE knows the path to the include files. There should be options that allow you to view/change this.
Reply:Did you #include %26lt;sys/ipc.h%26gt; ?





// Edit





You may need to reinstall pearl.





// Edit





You do need to reinstall Pearl 5.





This thread may be very useful:


http://forums12.itrc.hp.com/service/foru...


My compiler won't work, every time i try to compile and run this happens?

on visual c++ it says cannot execute


on dev c++ it executes yes.. but its too fast, the black window flashes on and off before i can read anything on it


same for codewarrior..... its just a simple program that shows hello world and it doesn't have any mistake bacause i tried it at the university lab and saved a copy to my usb disk and brought it home,, any idea what can be done?

My compiler won't work, every time i try to compile and run this happens?
add a "cin.ignore();" or a "system("PAUSE");" to your code so that the window doesn't go away until you hit Enter. Maybe that may reveal the problem.
Reply:It's not your compiler, you wrote a console application and it is closing before you see a result. Try adding this before return in the main statement:





printf("Press any key to continue");


getch();
Reply:type getch() at the end of your program

wedding reception flowers

The old "Hello World" program?

Hi,


I am just started learning C++ a few hours ago. (Why it took me a few hours of learning to get to the first program? I decided to go over the OOP lecture even though i got it in all my other web-programming books)


I'm using Dev-C++ compiler v5 BETA and all i get when running the simple program is Press any key to continue..


I talked to someone else and they said they get the same error sometimes but don't know why.


Help please?

The old "Hello World" program?
basic/ disk opration system
Reply:This is a program you wrote yourself?? Could you post it...should look something like:





#include %26lt;iostream%26gt;





int main( int argc, char** argv )


{


std::cout %26lt;%26lt; "Hello, World!" %26lt;%26lt; std::endl;


return 0;


}


I am making a program that needs to connect to a server, but I don not know how to access remote files.?

I'm using C++


I use Bloodshed Dev C++


I have Windows XP


I'm running Apache server





You can also contact me at jacjunior92@hotmail.com


Version of program will available later

I am making a program that needs to connect to a server, but I don not know how to access remote files.?
The short answer is that you have to have an external (remote) database setup, then you can use odbc to connect to it.


Programming?

how will i be able to write a program that counts the number of words and be able to give the output...one by one per line... im using turbo c and dev c. thank you

Programming?
Here's the program. It works on both versions of C:





http://www.experts-exchange.com/Programm...
Reply:Probably the easiest way - but not the most accurate - would be to use regular expressions and count spaces.
Reply:What unique character exists after every single word except the last one?





I won't do your homework for you, but I'll point you in the right direction.


Wats wrong with this?

i'm using the c++ compiler dev-c++ and when i put this in it compiles and it lets me enter the # but it shuts off 2 fast 4 me 2 see the double. using namespace std;





int main()


{


int i;


cout%26lt;%26lt;"please enter a integer value: ";


cin %26gt;%26gt; i;


cout%26lt;%26lt;"the value you entered is " %26lt;%26lt;i;


cout%26lt;%26lt;"and its double is "%26lt;%26lt;i*2%26lt;%26lt;".\n";


cin.get();


return 0;


}





wat am i doing wrong?

Wats wrong with this?
You're not running this from the command prompt so the program exits straight away.





Try this and it will wait for you to enter something after you see the double.:





int main()


{


int i;


cout%26lt;%26lt;"please enter a integer value: ";


cin %26gt;%26gt; i;


cout%26lt;%26lt;"the value you entered is " %26lt;%26lt;i;


cout%26lt;%26lt;"and its double is "%26lt;%26lt;i*2%26lt;%26lt;".\n";


cout%26lt;%26lt;"\nType anything to exit\n";


cin %26gt;%26gt; i;


return 0;


}
Reply:it sounds like you're building this in windows as a console app and running it by clicking the icon. my first advice is to not run console apps like this. open up a command window (start-%26gt;run: type cmd) and run the file manually.





what is probably happening here is that the cin.get() is grabbing something off the buffer (probably the enter/return key) and the function is returning as fast as it can.





change the cin.get() to cin %26gt;%26gt; blah and it should hold up there a little longer.

flowers gifts

Change program (using MODULUS OPERATOR)?

Well, it turns out. I have to use the MODULUS OPERATOR, and the math didn't work for Microsoft Visual C++ 6.0 anyways. It worked on Dev C++, but at school we use Microsoft.





Here's what I have so far for the program, all I need is the math for the nickels and pennies. The quarters and dimes seem to be working.





#include %26lt;iostream.h%26gt;





main()


{


int quarters;


int dimes;


int nickels;


int pennies;


int number;





cout %26lt;%26lt; "Enter a number. " %26lt;%26lt; '\n';


cin %26gt;%26gt; number;





quarters = number / 25;


dimes = number % 25 / 10;


nickels = I need help here


pennies = I need help here





cout %26lt;%26lt; "Quarters - " %26lt;%26lt; quarters %26lt;%26lt; '\n';


cout %26lt;%26lt; "Dimes - " %26lt;%26lt; dimes %26lt;%26lt; '\n';


cout %26lt;%26lt; "Nickels - " %26lt;%26lt; nickels %26lt;%26lt; '\n';


cout %26lt;%26lt; "Pennies - " %26lt;%26lt; pennies %26lt;%26lt; '\n';


cout %26lt;%26lt; '\n


return 0;


}

Change program (using MODULUS OPERATOR)?
Microsoft requires using namespace, replace the following line of code:








#include %26lt;iostream.h%26gt;





with this one:





#include %26lt;iostream%26gt;


using namespace std;


Why am I getting this output?

When I compile the following C++ code using Dev-C++:





#include %26lt;stdio.h%26gt;


#include %26lt;iostream.h%26gt;


using namespace std;


int main()


{


int so[8][8], i , j;


for (i=0;i%26lt;9;i++)


{


for (j=0;j%26lt;9;j++)


{


cout %26lt;%26lt; so[i][j]%26lt;%26lt;" ";


if (j==8) cout %26lt;%26lt; endl;


}


}


return 0;


}





I get:


0 0 2237568 16 2237576 9264 2228600 2228224 72


72 2228224 37878912 2089879280 37879504 126488 2 37879288 2089879275


2089879275 37879532 2089872920 2089878896 -1 2089878893 2009252574 2228224 0


0 2009252579 0 2237497 271256 2009291924 2009145480 -1 2009252814


2009252814 37879496 8 37879776 2009291924 2009145456 -1 2009252579 2009315348


2009315348 2237560 2237488 8 2009312941 0 2147303424 2147332096 56


56 2 37879600 2009198341 37879664 4198445 4268032 4268036 37879656





and so on....


Shouldn't I get this?





0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0


0 0 0 0 0 0 0 0

Why am I getting this output?
you defined the array, you did not initialize it so the values in the cells are what was in memory at that location.
Reply:bdloving is correct. Those figures are the numbers which are in the memory assigned to your array. They are technically known as garbage and you are supposed to initialize your arrays to sweep out all the garbage.





Give bdloving best answer and be careful about sharing your garbage with us. You never know who's looking.
Reply:change { int so[8][8] } to { int so[9][9] }

daylily

One more question..?

when pasting dev c codes to linux gcc, it has many spaces and it sucks, what can i do?do i have to transfer the codes in .c format?will it work?

One more question..?
if you change it


it would erase everything u have


A good Java IDE?

Are there any good and easy to work with Java IDE's? I'm starting to learn Java, (first time with Java but I know other languages pretty well), but I tried using the command prompt but it wouldn't compile and I'd get a bunch of errors. So, I'm looking for an IDE such as Dev-C++ for C++, are there any for Java and what are they?

A good Java IDE?
If you're starting to learn java, you might want to consider JCreator, the buttons and everything are quite intuitively designed. As for eclipse or netbeans, they are perhaps more for advanced java programming where you want to implement web applications.
Reply:Another way to go is to use Textpad. Once you get it set up, it becomes very easy to use, and it generally installs with a link to your compiler.





The link below comes from a college course on Java, and gives a how-to guide on installing Java, textpad, an ide, and other topics. You may be interested in looking through this, as it can be guaranteed that you will be working with Java from the cmd prompt, an ide, and a text editor by the time you're done.





Good Luck!


-Andy
Reply:eclipe you have to pay for that


blue j - bluej.org - just to get 2 grips with the langauge


but the best opensource 1 NEBEANS
Reply:I hear that eclipse is very good, however I personally prefer a free program called PSPad. Search for it, as am not sure of a specific URL.
Reply:Eclipse or NetBeans
Reply:Personally, I would suggest either Borland's JBuilder, or Netbeans. Borland has a free version of JBuilder that is very nice to develop in. Netbeans is also very good. I have heard some good things about Eclipse also. When I was in school pusuing my CIS degree, the prof I had (who had 35+ yrs of programming exp.) suggested we use JBuilder, so I figured if anyone would know which one was best, he would. Of course, in the end it may boil down to personal preference. Good luck : )
Reply:Eclipse is a very good IDE. go to eclipse.org


It's the one i've used for years.


When I'm writing a program and testing it...?

The box that's black and supposed to have my words or numbers and such, just blinks up and then goes away. How can I see if I made the program right if it does this? Can you give me a solution? I'm using C++ in Dev-C++. It executes, does what it's supposed to, then closes so fast it's lke a blink of an eye.

When I'm writing a program and testing it...?
ur program is working correctly i think, in C the program usually executes and goes away





if u want to stop it try this:





getch(); //add it after everything





in this way, ur program will be waiting a click on any key before it closes





im not sure i think getch is part of conio.h library
Reply:just include this line:


system("PAUSE");





at the end of your program.
Reply:do you have an english accent?
Reply:see if you can put a delay sequence/loop after your display. or if this is a DOS window... run the COMMAND command from the run box and then start the program
Reply:Try going on google.com and searching for a C++ debugger. this will test your program and show you whats going on with it and also notify you of bad code, and/or any errors in your code you may have. Hope that helps!
Reply:Run it from a command prompt, or else put something requiring user input at the end of your program.
Reply:The program obviously has not been created properly. Make sure that you include the correct CWM and COMPRESSION % in the DOS line when you are typing in the programs information. If this information is incorrect, the program is liable to do what you have explained. If you would like more assistance on this, please e-mail me for step by step guide information at jay1113@btinternet.com


I get an error when I try to load my program... I know the codes correct I made an exact copy, whats this mean

So I copied the following code into Dev C++ 4.9.9.2





#include %26lt;iostream.h%26gt;





int main();


{


cout %26lt;%26lt; "Hello!\n";


return 0;


}





and I ran it and for some reason it says the following:





C:documen....


The NTVDM CPU has encountered an illegal instruction


CS:0dbc IP:0103 OP:63 6c 75 64 65 Choose 'close' to terminate the application...





What to do to fix this?


The code is correct for sure and it's saved as .exe so no problem there...

I get an error when I try to load my program... I know the codes correct I made an exact copy, whats this mean
It seems that the compiler optimized the code wrongly. Try changing the compilation options for a more general CPU architecture, like i386. The source seems correct like you said, however, get rid of the semicolon after main().





And yeah, if you saved your source as an exe, of course it will not run, you need to compile it first.
Reply:When you say the code is saved as .exe, do you mean literally that. If so it can not work. The compiled programme needs to be the executable.

flamingo plant

In Corrie, who'd you pick, life or death?

Come on, if you HAD to!





a) jack


b)dev


c)vernon


d)roy


or


e)bill





I think I'd choose dev

In Corrie, who'd you pick, life or death?
If push came to shove I guess Vernon......Couldn't you have sneaked Liam in that List !!
Reply:Cheers for Best Answer hun xx Report It

Reply:PMSL Doobie!!! Omg do I have to choose? Oh well then it would be Dev - I don't think I could stomach the others!
Reply:dev hes a waste of space he can't even act , vernon is too but at least hes funny and stupid lol !!
Reply:Og God it would have to be Vernon as at least he is around my age and loyal and loving with a little bit of nutty in him.


Roy well come on who would?


jack bit old


Bill bit old for me


Dev to much of a wise man been around block and what if mad crazy woman got out of prison lol
Reply:NO!!!.....Dev is the only fit guy there.


Jack can go and Join Vera.





Edit: Did I get the gist of the question wrong?
Reply:I would have to choose Vernon Hes a Funny sweet charactor ,Jacks more in my age group a bit older ,But I am looking for a widower lol
Reply:i think vernon would get that excited it would at least be over and done with quickly!!!! you forgot about ken too. he's quite a looker!!! only joking!
Reply:omg thats so mean of you ok maybe if i really had to pick id say dev but id have to get drunk first
Reply:roy


he is a waste of space
Reply:Dev....or Jack if the beer goggles were steamed up enough.





NEVER Vernon, Roy or Bill. Oh dear no.
Reply:I suppose Dev, but I've always thought Vernon was a bit of a failed CJ de Mooi...the shirts, the hair, the being in touch with the feminine side, but of course CJ is so much better - you can't copy brilliance.
Reply:vernon and dev
Reply:Bill why is he in it
Reply:Dev, best of a bad bunch I think.
Reply:dev


How do I make a Win32 DirectX program?

I'm a good programmer, but I'm new to Win32 and DirectX programming. If I can view a "hello world" program that somebody else wrote, I'm sure I could get my project working. Are there any "hello world" sample programs out there for win32/directx programming? I use Dev-C++, but am willing to pay to get a Borland or Microsoft C/C++ compiler.

How do I make a Win32 DirectX program?
Download Microsoft Visual studio 2005 express edition (its free) and the direct X SDK. which has lots of examples that you can try out.
Reply:download the directX SDK from microsoft.com, then have a look at the samples. Also, you will find many, many tutorials in the web just by searching for them, or on gamedev.net, devmaster.net, etc.





i don't know if the SDK works with Dev-C++, but you can download the microsoft visual studio express edition for


free from microsoft.com. no need to pay for it.
Reply:well first you........2pts


Undeclared error using cout and endl?

i am very new to c++ and programming in general.


i bought a book called c++ all in one desk reference for dummies.


i am a few pages in and im having trouble making words come up into a dos box.





im using a program called dev-c++











#include %26lt;iostream%26gt;


#include %26lt;stdlib.h%26gt;





int main(int argc, char *argv[])


{


cout %26lt;%26lt; "hello" %26lt;%26lt; endl;


system("PAUSE");


return 0;


}








the compilier is giving me errors for cout and endl stating "undeclared" why is this happening?


if i erase line 6 i can compile and run without a problem

Undeclared error using cout and endl?
you're missing the statement:





"using namespace std;"%26lt;----Type this without quotes. Place this statement after your includes and before int main function








This will give you access to c++ standard functions like cout and endl. Oh and you're fine with %26lt;iostream%26gt;. It was updated from %26lt;iostream.h%26gt; to %26lt;iostream%26gt;











or you could write








std::cout%26lt;%26lt;"Hello"%26lt;%26lt;std::endl;





but if you're not into namespaces right now, then just stick with the first method. It definitely will enlarge your file if you use the second method
Reply:try using ' "\n"; ' instead of endl;





it might be "/n"; i don't remember which way it faces....you can actually do this:





cout%26lt;%26lt; "hello\n;"





(depending on the direction of the slash)
Reply:You can use cout%26lt;%26lt;"hello \n"; as an alternative.. I don't think yours is a wrong statement. May be like in the question u have typed, it is iostream.h (you have misseed the extension .h), try fixing it.





Or the problem may be due to corrupt compiler.


Please Help about Programming?

I got a book from the library on C++ but I use dev C++ to type in the codes and I have downloaded Vusual C++ 2005 Express edition but I don;t know how to compile and run the codes and Help on how to do that.

Please Help about Programming?
Get some tutorials from cprogramming.com. they are mainly based for dev c++
Reply:start by watching the videos on this page: http://msdn.microsoft.com/vstudio/expres...

umbrella plant

Programming Efficiency?

So I compiled a hello world in Dev-C++.


500k





I compile it in C


15k





Then I see....





Command Line wave player


http://www.cmdtools.com 2k





I look at one of those crazy hacker groups crack files


30k


- Has amazing music, definitely NOT MIDI


- Preforms a complex function assumedly


- Has transparency


- Is graphically Cool/colorful











What gives? I've researched assembler, but even then, I'd have to send it as an object in C code, further bloating it. Making a self executable in assembler sounds impossible although someone made their own highly featured OS with only 600k http://en.wikipedia.org/wiki/MenuetOS .

Programming Efficiency?
Actually, there are two different things to consider: The first is efficiency in speed, the other is efficiency in size.





First and foremost: you will always hear the saying "premature optimization is the root of all evil", which was quoted by Donald Knuth, math professor and author of the "Art of Computer Programming" series. In some cases, I do not agree with this statment, especially when the person who is making the supposed 'premature' optimization is making an educated optimization by knowing the architecture and knowing the end result.





That being said, there are two things (or a combination of the two) that are bloating your code. The first is that you are building a "debug" version of your code, which has unoptimized assembly and additional information used while debugging the application at run-time.





The other option is that you are "statically" linking your application with the run-time library. Static linking will pull in all of the code and dependencies for that code (the run-time are functions that you use, but didn't write yourself) and then it will reside in your executable. "Dynamically" linking, or having a DLL loaded at run-time will result in a much smaller executable, but when your application runs, it will load the DLL into its memory space and still take up memory resources.





Applications written in 'C' using only dynamic link libraries or those written in assembly can be the smallest and most efficient. However, chances are that they still use dynamic link libraries in the operating system. You can use a utility, such as dependency walker, to see what dynamic link libraries an application has loaded at runtime.





I've included a link to the (free) utility below.


Whats better, Programmer, or Engineer?

Whats better, Programmer or Engineer?





I love to build things, I fact building things and hot gluing thigs, and figuring out how to construct all different kinds of things even like bongs and water bongs ect.





Putting together computer taking them apart.





Now what I do with programming is mainly math since I just started out with C++ and I have the book and the compiler for Java, and I am also interested in working with code for BlueTooth, but that might be a long time from now.





Another thing is is that I only know how to do small programs with C++ and I can only program with iostream.h, but what Id like to do is start programming with windows.h.





The windows.h thing is very very hard, and even when I open a new source file with BloodSheds DEV C++ it looks very confusing...





But with programming, I really like programming, ...





Based on what I've told you, what do you think?

Whats better, Programmer, or Engineer?
Try Electrical Engineering which is designing computer chips etc. If it gets too hard, swith to Computer Programming. Both jobs are in high demand. Engineering pays more though.
Reply:Go to college, learn about both and pick the one you like more.


Does anybody know how to create directory(folder) which user can input the name of folder and how to modify it

whether in dev c++ or visual c++ or anyother c++ i need to know how to make a folder with user input name..

Does anybody know how to create directory(folder) which user can input the name of folder and how to modify it
It is not a standard tool, look into Win API to figure it, it doesn't appear in a standard publication anywhere I ever browsed. Open a file is a standard though.





If in doubt, create a subprocess and input DOS command in it. It works for everything that can be done in commandline including mkdir, worth to learn for that.
Reply:hey morteza..m the one who asked bout the hiy counters...i know wat u jus told me..but how do i insert it..??? Report It



Need Help immediately :: What's te output??

int main()


{


int n=10;


clrscr();


cout%26lt;%26lt;n%26lt;%26lt;"\t"%26lt;%26lt;++n%26lt;%26lt;"\t"%26lt;%26lt;n++%26lt;%26lt;"\t"%26lt;%26lt;...


getch();


return 0;


}





It is a question asked in our exam.





It shows 11 11 9 10


on turbo C++


and 10 11 11 12


on Dev C++..





Does this program work on Visual C++?


If yes please give me its output.





I need the real output.

Need Help immediately :: What's te output??
standard c output is:


11 11 9 10


also visual c++(all versions),and g++,gcc will give this output.

deliver flowers

Programming Help plz?

How do i makeGUI stuff with c++?





Uhmm im learinng c++ because i saw this game called eternal-lands which supposingly was made by it. However everything i do on dev c++ compiler runs with DOS. How can i make it so it runs with Windows instead? And also so it can show pictures and such. And also if some1 cud mention how to use OpenGl and DirectX i hear good things about them. Id appreciate help.

Programming Help plz?
Instead of creating a "console app..." or something to that effect, select "Win32 App...", but you'd have to learn how to create windows, buttons, etc.





Also, check out http://nehe.gamedev.net for some very nice OpenGL tutorials from beginner in C++ to very advanced stuff.
Reply:great place to start learning about game development





www.gamedev.net
Reply:It's much easier to learn C++ on the command prompt than with dialog boxes and such. A simple program to display the classic "Hello World!" program in C++ is just a matter of a couple of lines to the command prompt:





#include %26lt;stdio%26gt;





int main()


{


cout %26lt;%26lt; "Hello, world!";


return 0;


}





But to get the same type of thing with Windows (at least, to do it well) is going to require pages and pages of programming to register window classes, create a window, and respond to user actions. Not that it's impossible, but it's tricky. Many compilers have wizards that can help put some of this user interface overhead together automatically, but there's still a pretty steep learning curve.





For this reason, you may want to stick to a console-mode program for a little while until you're comfortable with the basics of C++. Then, pick up one of many books on writing code for Windows and go from there.





You're a LONG ways from using DirectX if you're just getting started with C++. Don't give up, though. C++ is what nearly all games and software of any significance is written in these days. Just don't expect to be writing flashy windows apps right away.





Try www.codeproject.com as well. Great site.


Whats better, Programming or Engineering?

Whats better, Programmer or Engineer?





I love to build things, I fact building things and hot gluing thigs, and figuring out how to construct all different kinds of things even like bongs and water bongs ect.





Putting together computer taking them apart.





Now what I do with programming is mainly math since I just started out with C++ and I have the book and the compiler for Java, and I am also interested in working with code for BlueTooth, but that might be a long time from now.





Another thing is is that I only know how to do small programs with C++ and I can only program with iostream.h, but what Id like to do is start programming with windows.h.





The windows.h thing is very very hard, and even when I open a new source file with BloodSheds DEV C++ it looks very confusing...





But with programming, I really like programming, ...





Based on what I've told you, what do you think?





Programming:


HTML, JavaScript, Java 2, and C++





Engineering:


Build Bongs, construct things, ect ect ect...

Whats better, Programming or Engineering?
I just LOVE programming, I would suggest Computer EEngineering you can do both :) because computer engineers have to know how to program....





Best of Luck
Reply:Try computer engineering, you can make a simulation of anything you want to build and save yourself time and money.


How do you use a compiler?

Ok im in the process of learning C++ and i was wondering how to use a compiler. I got this book C++ withought fear and it came with a compiler and its really crappy becuase i cant even get it too work on my windows xp.





So i downloaded dev-C++ and i dont quite get it i mean the thing looks like windows dos computers. Black screen with letters on it. I thought C++ was the high tech stuff they use for making world of warcraft and any other game out there thats 3-d and such.





WEll back to my question i dont quite get how the whole thing works about compiling can anyone plz help me!!!

How do you use a compiler?
A compiler (you may know) is the program that translates your C++ code into the language of ones and zeros that the computer understands. As such, it does not have to look spiffy. Ugly is okay.





There are some differences among compilers as to exactly how you use them, but the general idea goes like this. You write your C++ program in an editor and save it to disk. You tell the compiler where to find the program and it reads it and tries to translate it into machine language. It fails because no one can write a perfect program the first time. It gives you a list of errors it found. You patiently go through the list and correct the errors as best you can, then try to compile the program again. You keep repeating editing (debugging) and compiling until the program compiles. Then, you find out that it doesn't do what you meant for it to do. That is because there are still errors in the program. You find the errors, correct them, and compile again. You keep doing this over and over, and eventually, the program works the way you want it.





Your first programs should be very, very, very simple. I hope your book guides you in this direction. The first program should do something like print "hello." Once you get to that point you can enhance it. It might ask you to input something, then output that. You keep making more and more complicated programs, and eventually, you'll be able to program interesting stuff.





Good luck!!





=====================





I searched google for open source compilers and the two that came out on top are linked below. Maybe you would like one of those better.
Reply:When I had (note the past tense) to write C++ code, I used Borland C++, it's not free but it includes an excellent GUI compiler and debugging utility. I don't know of anything free that comes close.





http://www.borland.com/downloads/downloa...
Reply:download .net SDK from microsoft 's website and use it to compile your program from MS-DOS. can't get easy than this.


Need help?????????

Can someone tell me where to download any compiler and writer like Dev c++





where can I download Dev c++





Or anything better

Need help?????????
here:


http://www.bloodshed.net/devcpp.html
Reply:I think this is the link you are looking for.

floral bouquets

Whats better, Programming or Engineering?

Whats better, Programmer or Engineer?





I love to build things, I fact building things and hot gluing thigs, and figuring out how to construct all different kinds of things even like bongs and water bongs ect.





Putting together computer taking them apart.





Now what I do with programming is mainly math since I just started out with C++ and I have the book and the compiler for Java, and I am also interested in working with code for BlueTooth, but that might be a long time from now.





Another thing is is that I only know how to do small programs with C++ and I can only program with iostream.h, but what Id like to do is start programming with windows.h.





The windows.h thing is very very hard, and even when I open a new source file with BloodSheds DEV C++ it looks very confusing...





But with programming, I really like programming, ...





Based on what I've told you, what do you think?





Programming:


HTML, JavaScript, Java 2, and C++





Engineering:


Build Bongs, construct things, ect ect ect.

Whats better, Programming or Engineering?
Thats a whole lot of information for a question. But it seems you like you really love both and i dont think you can go wrong with either. They both have a good future, paid well ( tho i think engineers get slightly more), intellectually fulfilling. I think you should pick the one that you like better. If not pick the one that has a better program at your school.
Reply:seriously that is too much to read..





i have done programming and found it very difficult..it depends on which field would offer more money





thats the way i look at it


Winmm.lib and msimg32.lib?

Does Dev-C++ version 4.9.9.2 come with winmm.lib and msimg32.lib I'm quite sure it doesn't or I wouldn't be posting this.


If not were can I get them?


I got a book and none of the source code in it works, I says it should work with Dev-C++, And it said make sure you include the libraries winmm.lib and msimg32.lib

Winmm.lib and msimg32.lib?
These are libraries that should come with your compiler.


Whats better, Programmer, or Engineer?

Whats better, Programmer or Engineer?





I love to build things, I fact building things and hot gluing thigs, and figuring out how to construct all different kinds of things even like bongs and water bongs ect.





Putting together computer taking them apart.





Now what I do with programming is mainly math since I just started out with C++ and I have the book and the compiler for Java, and I am also interested in working with code for BlueTooth, but that might be a long time from now.





Another thing is is that I only know how to do small programs with C++ and I can only program with iostream.h, but what Id like to do is start programming with windows.h.





The windows.h thing is very very hard, and even when I open a new source file with BloodSheds DEV C++ it looks very confusing...





But with programming, I really like programming, ...





Based on what I've told you, what do you think?





Programming:


HTML, JavaScript, Java 2, and C++





Engineering:


Build Bongs, construct things, ect ect ect...

Whats better, Programmer, or Engineer?
This is m own personal preference.





My own experience is that programming, cutting endless lines of code does not hold the same challenge as engineering. There are some rather boring aspects to programming (but I guess the same holds true in engineering. Just I see less of it there).





There will be dozens of programers who will rip this comment to pieces based on their personal experiences and I expect and respect that.





However, if I had my time again I would not hesitate to choose engineering. Both are creative; both pay well if you are even half decent at whatever you choose. You seem to straddle both areas, so ask lots of people and look at some of the practical aspects of each - the day to day stuff and decide from there.





I would NOT put bong building as your first achievement on your CV.
Reply:Bad boy, bad boy,


Whatcha gonna do?


Whatcha gonna do


When they come for you?





Or are you not aware that building bongs and smoking tools is against the law?





From everything that you write, I foresee a strong career future for you in the Fast Food industry after you get out of jail.
Reply:I'm an engineer and I use programming to get engineering results. So my opinion is that you can be both at the same time. And personally I'd give a bit of weightage to engineering for that is more challenging and satisfying.





For example you would need good concepts and some experience if you were to design a digital filter. But I can get a newbie write the code for that filter given the inputs, required outputs and the logic. It doesnt matter if the language is C++, VB or Java. A good engineer can consider programming as tool.
Reply:You know, there is a lot to remember in engineering too, if you are having trouble remembering what you need to for programming, you might have some trouble. First thing to do is put down the bong.


While she was a bit snarky, Aviophage might be right.


Mac software help?

I use Dev C++ for my C programming class at college. I've been using my MacBook at lately. Is there a program for the Mac that works like Dev C++?


Thanks

Mac software help?
Code::Blocks.





http://www.codeblocks.org/

dried flowers

Please help me understand!?

Okay. I'm taking fundamentals of programming in college. We are studying C++.They start talking about declaring variables. From what I understand, a variable is a temporary location to store info. I also understand it needs a name, data type, and location in memory, and perhaps an assigned value. But, do you put this information into like Dev-C++ for example? And, how do you type in the location in memory? Or does that even need to be typed into Dev-C++? I'm soooo confused! Thanks for your answers. I really appreciate any help that can be offered.

Please help me understand!?
Ok to start with variables. They are like a row of mail boxes.


you label each box for employees, mary, sue and so on.





now you store information in them, mail that you are giving them. Now these boxes are temporary because of mary quits, you relable it new employee.





for example


you would declare a varible to store integers ( numbers )





int count


then you can store the count of users today ( this number changes/ variable)





To address memory addresses





The variable count is a lable for a memory location. The memory location is not in a format that you would understand to write your program, so you use a label such as a name you give the variable.





If you are taking a begining course, you most likely will never see this, but in the far chance I will mention it.





Pointers


your lable is actually a pointer to the memory address ( or link )


so when you access the variable name you are really altering the memory address that you don't see.


Pointers are very complicated that advanced folk have trouble with.





To address binary numbers


Computers are digital and they on recognize circuits in on or off states, otherwise known as ( 1 or 0 )





As far as character references like the number 9 or the letter "T" goes like this.





there is a standard ACHII ( I think) which states what every key on you keyboard, so your computer can understand that the letter you hit on your keyboard is actually what it is.





in other words the pc cannot understand what you are typing without a system.





we take for granted even as I write this that the screen knows what I am hitting on the keyboard. ( very complex behind the scenes).





To address what you can type into.





you can type into any text document, but you will need to put this text into a compiler which is what Visual C++ is.





Visual C++ is nothing more than an editor that allows you to compile when done. There is really nothing visual about.





not like Visual Basic





hope that helps.
Reply:Well I'm not a programmer, but i know a lil about web scripting so maybe i can help you with the number and character thing.





Letters are always Characters but numbers can be Characters or Numbers. For example:





Num (Binary):


9+1=10


1+9=10





Char (ASCII):


9+1=91


1+9=19
Reply:One suggestion: always try to do C/C++ programming in Linux environment. For that you need to use the compilers gcc/g++, which comes default with Linux. I hope the following coding will be useful to you.
Reply:declaring a variable sometimes is as easy as:





var ThisWord = "fudge"





A string is inside "quotes"....so if you have this:





var ThisNumber = "9" that is really saying that it's a character 9 (not a number)





var ThatNumber = 9; is equal to the number 9





The difference here is, you can't add "ThatNumber" to "ThisNumber" because their data types don't match....they would both have to be a data type of "number" to work....





That probably didn't help much....I know ASP, PHP, ColdFusion, but not C++


What is .NET Framework anyway?

Okay, I am a novice coder and I recently moved away from C++ to pursue C#. I have a lot of trust in C++ because it is so widely used, but when I found out that C# is a much newer language, I wondered if C++ might become obsolete.





I used Dev C++ (Bloodshed) to compile my projects. Everything was very simple and straightforward. Install, write, compile. Very simple. Now that I am trying for C#, it seems a bit more complex. It would appear that I not only need to install a compiler, I also need to install some .NET FRAMEWORK. Have I got this right? I have also heard that .NET FW is a standard on all copies of Windows XP. I have XP, but I have never seen .NET before.





So to summarize:


What is the .NET Framework?


--Do I need to install .NET, the compiler, or both?


--Could you reccomend a free compiler for beginners?


--In your opinion, would C# be superior to C++ in the field of game development, or the other way around?

What is .NET Framework anyway?
.Net is much like Java. .Net is an OO framework like Java, but unlike Java, .NET accepts multiple languages (J# (Java), C#, VB, C++, RPG, Cobol, Fortran, etc.).


The .NET SDK is free.





The hardware platforms are more limited - currently. I don't see any reason the runtime environment couldn't be ported to other hardware as popularity grows.





1) When you install the .NET framework SDK, it installs everything you need. Link below.


2) There's only 1 compiler, the one from MS. Development tools - most people use Visual Studio, but that's not free. You can program in any text editor.


3) Not sure.
Reply:Use this from Microsoft it's free:





http://www.microsoft.com/express/vcsharp...





Google how to write in C# you'll find tons of websites with script. Your C++ background will help you a lot. The two languages are SIMILAR so your learning curve will be less.





The reason to really learn this is the many jobs available. Go to Monster and check it out.
Reply:The .Net framework is a bunch of support files so whatever you create will function properly.


Back in the day it was called runtime files. Some OSs you had to install the VB6 runtime files or a program wouldn't run.
Reply:Yes you need to install .net its a huge package, some 4-5 cds when i first installed. its not free..


using .net you can develop a web application as well as a standalone app.





later i moved to java. my life is fun. it is based on oop, similar to c++ but more widely used in web apps.





try java


How can i complile a C++ code using only notepad?

i want to be able to write codes in school but they dont have Dev or visual studio





i saw some one do it with java and the command prompt open and it was there he used alot of batch files





any way i want to do C++

How can i complile a C++ code using only notepad?
You will still need a compiler (g++, cl). But you can edit the source files (*.cpp) in notepad and then run make.





Normally, when you develop you use a program called 'make' or 'nmake' to do your compile/link process using something called a Makefile. He might of been doing that.
Reply:yes.





go here: http://gcc.gnu.org/








and download the C++ compiler,





then from there open it up, it will be a bash shell and you can compile code like





g++ blah.cpp -o blah_name_of_exe





and to run ./blah








if ur used to dev, you dont need system("PAUSE"); at the end of ur code, and it will prolly give you errors if you do it








from notepad remember to save ur files with .cpp extensions





u might wanna try downloading notepad ++ it is the same thing as notepad but has syntax highlighting
Reply:I don't think Java requires compiling, what with its byte-code and all. I might be wrong.


Help with C programming assignment?

Hello!!


I have dificulties figuring out how to add the calculation for confidence interval into my code. The equation for confidence interval is: mean +/- z* standard deviation/sqrt(number of samples)


Ok I have to add this calculation as well prompt the user for the z value, for example z value of 1.645.





I am new to C programming and don't understand it that much.


Any help would be appreciated.


I WAS NOT ABLE TO COMPY THE WHOLE CODE HERE. THIS IS THE BEGINING OF MY PROGRAM.


Thanks...


#include %26lt;stdio.h%26gt;


#include %26lt;math.h%26gt;


#define N 12





/* Function prototypes */


double mean (double num[ ]);


double variance (double num[ ], double m);


double std_dev (double v);





void main(void)


{





double m, v, stv;


double num[N] = {87.8, 45.7, 56.7, 78.6, 49.7, 91.2, 87.6, 63.6, 59.8, 98.3, 77.2, 81.3};





m = mean (num);


v = variance (num, m);


stv = std_dev (v);


printf ("Mean = %.3f\n", m);


printf ("Variance = %.3f\n", v);


printf ("Standard Deviation = %.3f\n", stv);


}

Help with C programming assignment?
you have to give the chance to a expert for do this for you.


like http://expert.userstyle.org/
Reply:OK Im assuming the functions mean(), variance() and std_dev() exist and are being calculated correctly. All you need to do is make sure you:


1) Prompt the user for z and store this value, this would go in the main() function before m = mean(num);





double z;


printf ("Enter the z value for the Confidence Interval calculation\n");


scanf("%f", %26amp;z);





2) Your Confidence Interval formula has 2 values so you need to calculate 2 values according to the following.





/* Add these at the top of the main() function */


double ConfidenceIntervalMax=0;


double ConfidenceIntervalMin=0;





ConfidenceIntervalMax = m + (z*stv)/sqrt(N);


ConfidenceIntervalMin = m - (z*stv)/sqrt(N);





Now you can print these values or do whatever you like with them
Reply:Hi,


u have all the values to calculate confidence interval. for calculating the same u need to write numeric expression only.


ur C.I. is





mean - (Z * SD)


-------------


sqrt(n)





then calculate m - ((z*stv)/sqrt(n))


and m + ((z*stv)/sqrt(n))


or write


printf("(%f, %f)",m - ((z*stv)/sqrt(n)),m + ((z*stv)/sqrt(n)));





it will calculate and print C. I.

gift baskets

WIch is the most used tool for C++ game programming?

What tools are used by the professional game creators such as |id| or JoWooD?I have writed a FPS in C++ but know ya i need a professional tool!Now i use dev-cpp.If anybody can help me ...

WIch is the most used tool for C++ game programming?
I've talked with some people and they seem to almost exclusively use Visual Studio. It really is the best program Microsoft have made. I know Mike McShaffry is using it and that it is almost a standard these days. If you are a member of a university then you might have access to the MSDNAA and be able to download a free copy (the newest, 2005), but you cannot write commercial code with it.





The next best in my opinion is Dev-CPP though. All in all if your use to Dev-CPP you might want to stick with it, as all these tools are, are a glorified text editor and compiler combo with useful features to speed up you work flow (well done on coding the FPS by the way, vector and matrix math can be very though, unless you used OGRE or something similar, email me with any problems you might have and I'll try to help you fix them).





EDIT: The main reason I like Vis is the IDE Debugger, it makes my life a hell of a lot easier.


C++ Compiler?

Does anyone kow of a good compiler for C++? I don't want an IDE, cuz I've tried Code::Blocks and Dev-Cpp, but I just want the compiler. Any suggestions?

C++ Compiler?
Digital Mars C and C++ Compilers for Win32, Win16, DOS32 and DOS. Fastest compile/link times, powerful optimization technology, Design by Contract, complete library source, HTML browsable documentation, disassembler, librarian, resource compiler, make, etc., command line and GUI versions, tutorials, sample code, online updates, Standard Template Library, and much more.





http://www.digitalmars.com/
Reply:For whatever product you are using, just use the compiler. You are not required to use any IDE if you don't want to. All the products expose the compiler as a separate executable. Just set up your make or build utility to use your compiler.





As far as which compiler to use, this question comes up at least once a week. Look in the question history.
Reply:The Dev c++ by bloodshed.


Can i c mine marks sheet and all other information online from P.S.E.B(MOHALI) ........AND G.N.D.U (AMRITSAR)?

Hi


Can anyone tell me that, if i can c mine records, and mine all information like mine DMC, mine name, fathers, mothers name, D.O.B.................. as a student of GNDU(guru nanak dev university, amritsar)and P.S.E.B(PUNJAB SCHOOL EDUCATION BOARD , mohali)................ in their online website ........................................... how long back records we can c online....................like how many years back................plz tell me if someone has her student registration number, roll number , all other requied information ....................then can they c their DMC online ........................n can print that or not.....................PLZZZZZZZZZZZZZZ... m waiting tell me .....................the website for both, where i can c all this information.......................

Can i c mine marks sheet and all other information online from P.S.E.B(MOHALI) ........AND G.N.D.U (AMRITSAR)?
Why not call up the universities in question and simply ask them? That would be your best bet :)


Cant play some ISOs on PSP 3.03 oe-c?

Some ISOs like GTA:VCS and 50 cent bullet proof wont load on my PSP, when i click on the game the screen goes blank with the back light on, but the PSP is not bricked, because i switch it off, then switch it on and it works. Is there any fix to this, I have PSP FW 3.03 oe-c. If it is firmware problem, then can i use a Dev hook? or anything else to emulate any other firmware? or will i have to upgrade? If i have to upgrade can someone give me links to upgrade my PSP?

Cant play some ISOs on PSP 3.03 oe-c?
Turn off the PSP....now turn on the psp while holding R....





Now turn off load UMD setting..





go to advanced config and turn off all 3 options (if more then three turn them off too) now play..





Enjoy +10.

wedding

Harry had a z-score of 1.23 on a test that had a mean of 72 & σ (standard dev.) of 13. Harry's raw score was?

Harry had a z-score of 1.23 on a test that had a mean of 72 %26amp; a σ (standard dev.) of 13. Harry's raw test score was?








a. 102





b. 88





c. 78





d. 68





e. 52





or is it none of these

Harry had a z-score of 1.23 on a test that had a mean of 72 %26amp; σ (standard dev.) of 13. Harry's raw score was?
72+1.23*13=88 Or B


Perl vs. C++?

Which is better, and why?


can you do everything in both?


which is more complex?


is there a perl compilier that you make your stuff in for it?


where can i get it?


how do i learn perl?


should i learn C++ instead?


where can I learn it?


I have bloodshed dev installed already.


IT MAKES NO SENSE.

Perl vs. C++?
Each has their uses.





Perl is a scripting language - best for breaking text into better units (parsing) - good for smaller projects under 10,000 lines of code. Also good for scripting repetitive tasks.





I like perl. recent perl tasks included:


1. Digging information out of a report and making a much smaller, terser report.


2. querying routers via snmp for information and making a report.


3. putting information into a MySQL or Postgresql database.








C++ is an object oriented language - good for large projects .. and where object oriented thinking will help the project.





Ubuntu linux...gets you both Perl and c++ and many other tools for free.


See 'the official ubuntu book'


see http://www.ubuntu.com/





www.activestate.com is a good place for the perl under windows.





c++ can be also obtained from vendors like Microsoft.





You will learn to program faster with perl. I liked "learning perl" and "the perl cookbook" as a place to start.





You might consider php as well.





if you install a linux, you will get the tools installed faster. then you can concentrate on doing something.





it also helps to have a project in mind when you want to learn something.


Thursday, July 30, 2009

Grading curves: C to C+ centered mean?

I know that in many of my classes, the curve is based on a C to C+ centered mean. It says the A/B cutoff is the mean plus on standard deviation, and the D/F cutoff is the mean minus on std. dev. What I'm wondering is, what exactly do they mean by "C to C+ centered mean?" Is the mean a C/C+ cutoff? If you get a score close to but higer than the mean, is that around a C+ or B-? I understand how this works for scores that are not close to the actual mean, but it seems more confusing when they are. Thanks.

Grading curves: C to C+ centered mean?
It means that the average score on the test was between a C to C+. Therefore, a C+ would be curved closer to an A+.


Using C how do I write to a memory location using pointers?

I'm having a play around with an embedded dev kit, and although I know the very basics in C, I'm trying to use pointers to access a certain memory location. Specifically I want to write;


0x00000055 to memory location 0xFF003030





any suggestions;


my initial approach was;





int *ptr = 0xFF003030;


ptr = 0x00000055;

Using C how do I write to a memory location using pointers?
int *ptr; /* declare the poiner to an integer at first */


ptr=0xFF003030; /* let the programm know that location's address*/


*ptr=0x00000055; /* put the desired value to the previously setted location */





(PS: AM is Wrong! His solution is to put a value in a place the compiler will choose, which doesn't solve the proposed problem; my solution does; and it's the shortest!)
Reply:Well mate, u makin 1 mistake i suppose...instead of *ptr(i.e. a pointer) try using a variable like int ptr=0xFF003030 since hexadecimal numbers are assigned in this way and its just a hexadecimal value not a reference......

flowers on line

What shud i do( c# or vb.net )first, in order to get a MCTS for windows-based client?

.net framework understanding is needed. but it is taught in both c# and vb.net. I want to learn a lang/technology which would take me towards the windows-based client dev. certification.


so VB.Net or C#?

What shud i do( c# or vb.net )first, in order to get a MCTS for windows-based client?
seeing that c sharp is the newer, i would go for vb.net first as it is likely to be more in use. you could come back and do the c sharp later on


Which is good c,c++ compiler with IDE?

I have been using turbo c++ for dos , i want to shift to windows applications which is the best c,c++ IDE i want something other than visual c++ express microsoft , cygnu , dev-4.9

Which is good c,c++ compiler with IDE?
I started using the Watcom compiler which is now free from:





http://www.openwatcom.org/index.php/Down...





Most of my C/C++ source codes for Windows are on my website (free):





http://freespace.virgin.net/roy.longbott...
Reply:You can also use vi in windows, and customize it to compile your source.





You can try borland C++ IDE


Eclipse IDE with C++ plugin


netbeans with C++ plugin
Reply:check Qt-designer from troll tech


LINUX EMERGENCY...HELP! CAT /DEV/URANDOM > /DEV/HDA1 HELP Me!!!?

Some loser just had me cat /dev/urandom %26gt; /dev/hda1





I Ctrl+C it before it was finished, but I can't open anything and I can't save anything; my HDD is full. Someone please help me.

LINUX EMERGENCY...HELP! CAT /DEV/URANDOM %26gt; /DEV/HDA1 HELP Me!!!?
Repeating that command 7 times on a disk considered 'classified' by the US government is enough for the disk to be considered cleaned.





As mentioned above, you should never type a command as Linux Root before you know exactly what it'll do.





There is no affordable way to recover your disk, you'll need to reformat and reinstall.





You should know that normally urandom generates random sequences based on the interference found in the hardware. So it's about as random as you can get on your computer.





Any time you are piping to the folders /dev or /proc, make sure you know exactly what you are doing.





/dev are devices on the computer ( hda1 = harddisk primary master partition 1).





/proc is pieces of the kernel memory available in the filesystem.





Have a look at the included link, it talks about this command. (actually dd if=/dev/urandom of=/dev/hda ). But it's as effective as the command you did if you don't want to lose your data.





Sorry,





David
Reply:He's seriously not kidding - this is why you shouldn't be root. Ever.
Reply:You're screwed, sorry.


Is H.C. VERMA book of physics sufficient for preparation of IIT-JEE 2007?

i m having H.C.VERMA book of physics. is it sufficient for preparation of IIT-JEE 2007 ? or should i look for any other objective book also like M.C.Q. by DEV. MUKHERJEE? plz reply...


also give some tips how to prepare? I have passed +2 and dropped this year for it. so its my last chance to sit in this exam, and i have to clear this exam at any cost.

Is H.C. VERMA book of physics sufficient for preparation of IIT-JEE 2007?
H c verma is nice book and read the conceps given in it first before attempting any problems. for electricity %26amp; magnetism resnick halliday is better. overall resnick is nice book .


After u hav all done with this books next is our I E IRODOV.


if u can do all problems of irodov than ur selection is sure.


i m als o preparing for jee this year so i hav told what i know.
Reply:Please visit


http://www.iitjeeaieee.com Report It

Reply:Better join some regular coaching classes as you have got another 6 months more.
Reply:first of all read halliday resnick and h.c verma thoroughly


then try the problems in h.c verma...do not leave out the objective questions...also try the the 1st section of questions(which do not have answers)...b'cause they really sharpen ur concepts...


only after u have done all this do u move on to irodov


i think this would be more than enough for ur jee preparation.......best of luck
Reply:It is not enough. Try Irodov, and better if you can get study material of correspondence cource of Brilliant Tutorials.


My sis had that, and It proved to be beneficial for her
Reply:it isn't.go for 'PROBLEMS IN GENERAL PHYSICS'-I.E.IRODOV for the ultimate preparation.you could also try RESNICK HALLIDAY if you haven't uptill now.
Reply:the book is really very good and certainly more than enough provided you understand all the concepts involved in the problems that he has presented. you should understand the message of every probem and not simply solve them mechanically to get the answers.


i appreciate the order in which he has presented the problems.


other books like mukherjee will help you know what you have understood and also help you to build your speed.
Reply:there is no book who is sufficient for the preperation of IIT JEE . we can say that H.C.Verma is the basic requirement for the prepration of IIT-JEE. wee must consult other books also.
Reply:that book is good but for iit u cant depend only on one book ..better try feynmann's lectures in physics,halliday resnick,dinesh publications objective physics,tata mcgrew's course in physics for iit jee..better refer much reference books

florist shop

How do you connect yourself to a database in c++?

please I programming in c++ using dev compiler and i would like to connect myself to a database how could i do it? please help me. thanks

How do you connect yourself to a database in c++?
Actually, i created a simple C++ program with database before. I took me a long time to create it because the coding is really hard. Hehehe. You need to create Structures and Classes. I alredy forgot how to do it again. Hehehe. But I have a book about it. What I can advise for you now is to search more on the Internet or try to look for books or eBooks.
Reply:depends on the database.





i.e. mysql offers a library which you can use to open a connection, use SQL statements etc. you can download it on mysql.org.





windows programmers can also use ODBC libraries to connect to ODBC databases.


Can a C++ reference hold a reference to a child of it's class?

For C++ gurus.





Consider the following code snippets:





ostream %26amp; outfile=cout; // assign stdout to a reference of ostream





Then I may want to do something like this:


ofstream* alternate_op=new ofstream("my_output.txt");


outfile=(ostream %26amp;) *alternate_op;





Now outfile points to my alternate output file instead of stdout. Fine. In MS Visual C++ 6.0 this works out just the way I want it. But other compilers (such as MingW for Windows) complain with messages like:





741 C:\Dev-Cpp\include\c++\3.4.2\bits\ios_ba... `std::ios_base%26amp; std::ios_base::operator=(const std::ios_base%26amp;)' is private





So, is my solution the best one? Or is there a better way? I want to be able to dynamically use either stdout (cout) or my own o/p file stream along with operator%26lt;%26lt; to format output without a lot of fooling around about which one I'm really using. And I'd like my solution to be as portable between compilers as possible.

Can a C++ reference hold a reference to a child of it's class?
Biting my tongue and not taking an obligatory swipe at VC.





Assuming you can, just change the reference to a pointer and you are good to go.








int main ()


{


ostream* outfile = %26amp;cout; // assign stdout to a POINTER to ostream





*outfile %26lt;%26lt; "Hello\n";





ofstream* alternate_op=new ofstream("my_output.txt");





outfile = alternate_op;





*outfile %26lt;%26lt; "World" %26lt;%26lt; endl;





}
Reply:You could run into a dangling pointer problem.
Reply:In C++ you can't reassign a reference. I don't know why VC6 allows you to do it, but it shouldn't. When you assign to a reference, you actually assign to the value being referenced. In this case your code is trying to change the value of cout.

sympathy flowers

What is the difference when programming for xp or vista in c++?libraries/.net win32. help!?

Right now i'm learning win32 on dev-c++ and it's hard without a visual developing environment like vc6 or vb5. Is there a difference when programming for xp or vista?

What is the difference when programming for xp or vista in c++?libraries/.net win32. help!?
Microsoft offers a very powerful .NET Framework for Windows XP and beyond. Microsoft Visual Studio 2005 Express edition for C++ or for C# are powerful development environments (Express editions are downloaded for free). The C++ version encourages you to write "safe" code. That means you cannot use pointers. However, you can write unsafe code and use pointers in this language.





The framework automatically cleans up resources/memory when you do not explicitly use pointers.





Microsoft has been very successful in offering a very powerful set of framework features. I recommend you go on to learn what Microsoft .NET Framework has to offer developers. C# is a successful threat to Java.
Reply:why is it difficult wthout vc6 or vb5? there are some free IDEs available.





there's some difference between XP and vista. Vista's security model is very strict - if you're not an elevated user (administrator), you're not allowed to store files in some directories, or create registry entries. Also, the firewall can make problems if you use the internet. XP is not that strict.





but in most cases a program will run fine on vista if it was written for XP.


Can you hide the icon that appears on the taskbar from a C++ console program?

I've been programing for about a year and a half. I'm using Dev C++ to write a simple C++ console program and i don't want to have that icon in the taskbar that says that the program is running. Is there any way to hide it?

Can you hide the icon that appears on the taskbar from a C++ console program?
Yes. I do this all the time. See Dominik Filipp's article:


http://www.codeguru.com/cpp/frameworks/a...





If you'd like to place an icon or animation in the systemtray, see Chris Maunder's article:


http://www.codeguru.com/cpp/com-tech/she...





I often use both of these mechanisms.
Reply:i dont know sorry i cant help
Reply:If you write the program as a service then it doesn't get a taskbar icon. So your keylogger doesn't get discovered right away.


Can u tell me a easy way to learn c++ within7 days?

before exams short cut to dev c++

Can u tell me a easy way to learn c++ within7 days?
Firstly, you should mention what level of programming you want to learn.





And No, I don't think you will be able to learn college level c++ in 7 days on your own (unless of course if you know some other similar programming language like c or c# already, or in a remote circumstance are a programming whizkid)





I would suggest that you take some private lessons for the next 7 days on c++ with somebody who really knows it and has been using it regularly off late.
Reply:no its too hard to learn in a week


How can i make a game using C++?

a game engine





im also using Dev C++ as the compiler

How can i make a game using C++?
You're wrong kid. C++ is the industry common for creating games. You need either XNA(like mentioned before) or Direct X. You should get Visual C++ Express Editon also.


Or you can use Dev C++ with allegro.Here is a good site for that:


http://www.cppgameprogramming.com
Reply:I'm not too sure, but i think Microsoft's xna game studio express will make it easier.
Reply:you make a game just like you program anything. Unfortunately C++ isnt really made to be doing graphical stuff so your limited to word games. at the very least you should use JAVA but sticking to something specifically for game design.

bridal flowers

How do you cin/getline while a c++ program is still running and displaying text?

I am writing a console app in dev c++ in which a timer runs down to zero. While the timer is running down, the user has to enter in a password. I have the program working except for getting the timer to run down while the user has a chance to cin, because it stops program flow until data is inputted. Here's a basic version of the countdown code:





for(int b=60;b%26gt;0;b--)


{


system("cls");


cout%26lt;%26lt;b%26lt;%26lt;endl;


cout%26lt;%26lt;"%26gt; ";


Sleep(60000);


}





Somewhere in that code I want the user to be able to stop the loop and enter in the password, but I do not want the loop to stop unless the user begins typing.

How do you cin/getline while a c++ program is still running and displaying text?
If you want to use C++ style input ( via cin ) and still have a time going down, you will have to look into thread programming.





Otherwise, abandoning the proper C++ way of doing things, you will have to resort to researching low level C calls that allow you to check if there is a character available via stdin.





I would recommend the threaded design, even though its more tricky to implement.


What is wrong with my declarations in C++?

#include %26lt;iostream%26gt;


#include %26lt;list%26gt;


#include %26lt;conio.h%26gt;





using namespace std;





main()


{


list newList;


getch();


}





I am using Dev-C++ as my Compiler... When I try to run this program, the error says... "missing template arguments before "newList" and 9 "expected `;' before "newList" "





Am I missing something, or it is just not the proper declaration of the class?

What is wrong with my declarations in C++?
list is a template, i.e. you have to specify what you want a list *of*. Use something like this....





list%26lt;int%26gt; newList;


newList.push_back(7); // push the integer 7 onto the list
Reply:list newList();