Monday, May 24, 2010

Linked Stack C++?

I have a program that uses a linked Stack to store the data. I need to know how I would go about displaying the data inside the stack. I'm having programmers block....

Linked Stack C++?
Something like this:





void DumpStack( Node * pNode ) {


....while (pNode != NULL) {


........cout %26lt;%26lt; pNode-%26gt;data %26lt;%26lt; endl;


........pNode = pNode-%26gt;next;


....}


}
Reply:You could cout the top item, copy it into a second stack, and then pop it. This way, when you've reached the last item in the original stack, the second stack will be an upside down copy of the original. You could either get rid of the first one or, if you need to maintain the order, put everything back into the first stack as you pull it off the second one.





Sorry, I hope you weren't looking for code.

salary survey

C++ question?

Input stream buffer contains


22 34.5\nHello A\nWorld 34 45 //\n represents new line chara


What is the output to the terminal when the code segment is executed





Code


int m; float x; string text; char ch;


cin %26gt;%26gt; m %26gt;%26gt; x;


getline(cin,text);


cin.get(ch);


cout %26lt;%26lt; m %26lt;%26lt; "-" %26lt;%26lt; x %26lt;%26lt;"-" %26lt;%26lt; text %26lt;%26lt; "-" %26lt;%26lt; ch %26lt;%26lt; endl;





Can one of you programmers help with this

C++ question?
You could just compile %26amp; run this and get the answer.





1) I typed up this program.


#include %26lt;iostream%26gt;


#include %26lt;string%26gt;





using namespace std;





int main()


{


int m; float x; string text; char ch;





cout %26lt;%26lt; "Enter stuff:\n";


cin %26gt;%26gt; m %26gt;%26gt; x;





getline(cin,text);





cin.get(ch);





cout %26lt;%26lt; m %26lt;%26lt; "-" %26lt;%26lt; x %26lt;%26lt;"-" %26lt;%26lt; text %26lt;%26lt; "-" %26lt;%26lt; ch %26lt;%26lt; endl;





return 0;


}





2) I compiled it with g++.





3) I ran the executable and I had the answer within seconds.
Reply:Trace it or run it.


Tracing it is easy. match the variables in with the stream of characters. EX:


m will get 22


x will get 34.5 Notice x is also a float (real number)


So trace and tell the result.


Why didn't you try running it/????


C# drawing question (asked in an easier to understand way). A best answer will be awarded.?

I have a class that draws itself.





The class draws a picture of what a node looks like in a B tree. But this takes a lot of method calls.





1. draw top line


2. draw bottom line


3. draw left arc


4. draw right arc


5. draw diving lines inside node


6. draw left rectangle


7. draw left circle


8. draw right rectangle


9. draw right circle


10. draw rectangle between left and right (in a for statement, so if there are 50 data cells this code runs 48 times)


11. draw in numbers on each data cell





etc etc etc





I dont want the computer to have to execute all of that code every time it has to repaint the window (due to it being minimized or another window dragged over top of it, etc).





So I just want to know how programmers usually deal with something like this. Is it okay to have it go through all of that drawing every single time it needs to repaint? Mind you, this will be the drawing of only one node.... there could be hundreds that need to be drawn!





thanks for your help!

C# drawing question (asked in an easier to understand way). A best answer will be awarded.?
You can make a path and save it. I assume that since you are drawinf nodes, that each looks the same. I program in VB.Net, but the code is virtually the same for C#...





Dim path As New GraphicsPath


Dim rectRoundBounds As New Rectangle





path.StartFigure()


path.AddLine(rect.X + Radius, rect.Y, rect.X + rect.Width - 2 * Radius, rect.Y)


path.AddArc(rect.X + rect.Width - 2 * Radius, rect.Y, 2 * Radius, 2 * Radius, 270, 90)


path.AddLine(rect.X + rect.Width, rect.Y + Radius, rect.X + rect.Width, rect.Y + rect.Height - 2 * Radius)


path.AddArc(rect.X + rect.Width - 2 * Radius, rect.Y + rect.Height - 2 * Radius, 2 * Radius, 2 * Radius, 0, 90)


path.AddLine(rect.X + rect.Width - 2 * Radius, rect.Y + rect.Height, rect.X + Radius, rect.Y + rect.Height)


path.AddArc(rect.X, rect.Y + rect.Height - 2 * Radius, 2 * Radius, 2 * Radius, 90, 90)


path.AddLine(rect.X, rect.Y + rect.Height - 2 * Radius, rect.X, rect.Y + Radius)


path.AddArc(rect.X, rect.Y, 2 * Radius, 2 * Radius, 180, 90)


path.CloseFigure()








Then call





g.FillRegion(brushBackground, New Region(path))





or


g.DrawPath(BorderPen, path)
Reply:Hm, I already answered this question elsewhere ;-)


My advice is to use double buffering, or just ignore it. It might not even be a problem unless youve tonnes of them





Remember modern graphics cards can thousands and thousands of polygons per second without even sweating
Reply:a simple and fast solution would be to following: I am assuming that you are writing to a picture box.





Im not going to provide the code since you seem to know what you're doing.





after you draw the image that you want save it as a .bmp to memory. when the screen needs to be refreshed simply draw the .bmp image to the device context (aka the picture box).





good luck

survey

Which one of the following individuals would be most likely to vote?

A. A 19-year-old high school graduate who likes to complain about the government


B. A 22-year-old computer programmer





C. A 30-year-old college graduate who has just moved to a new state





D. A 50-year-old corporate executive who holds a master's degree in business








Anyone able to find documentation on this, or have definite knowledge to this answer, I'd really appreciate it. I'm honestly stuck between answer D, it sounds logical, but I'm worried I'm going more so by age. Thanks anyone =)

Which one of the following individuals would be most likely to vote?
As far as I know, age IS the determining factor for voting. As a general rule, the older you are, the more likely you are to vote. That's why you have to be 21 to drink instead of 18, like in the 70s. There weren't any kids voting to vote against it.


Which one of the following individuals would be most likely to vote?

A. a 19-year-old high school graduate who likes to complain about the government?


B. a 22-year-old computer programmer?


C. a 30-year-old college graduate who has just moved to a new state?


OR...


D. a 50-year-old corporate executive who holds a master's degree in business?








THESE ARE QUESTIONS THAT COME OUT OF MY HIGH SCHOOL QUESTION'S BOOK! I HAVE EXAM TEST AFTER EACH CHAPTER! %26amp; I STILL HAVE NO CLUE? help me please. I really do need answers that are correctly answered and not people who are going to mess around and be mean or try and say something stupid. Like they have before. THX

Which one of the following individuals would be most likely to vote?
I would say the corporate executive.... he makes tons of money and needs to vote people in who will give him tax breaks.... and tax the sh/t out of the poor.
Reply:The 50 year old. He has seen enough elections to be pissed off about the way somthing is going in the government and his company probably contributes to the Republican party.
Reply:Well it depends if the 19 yrd is a conservative they WILL vote if the twenty-two year old is a conservative they WILL vote. The thirty year old is a conservative they will Vote. The fifty year old will probably vote irregardless unless they are cynical about government.





Now a liberal 19, 22,30 will probably not vote.
Reply:Older and richer are always more likely to vote. Older and richer.
Reply:D. a 50-year-old corporate executive who holds a master's degree in business.





They have the most to lose financially, and we all know about how the rich want to hold on to their money. It's how they define themselves.
Reply:I think it's D, since the reason for it would be that for A. the kid is probably just like to make themselves feel important by voicing his/her opinion, but when it comes to action, probably the student would not actually take the effort to vote.





B. In a choice like this, when the subject (programmer) has really nothing to do with politics, there's really no motivation for the programmer to vote.





C. College graduate is not the same kind of easily excited high school student, and is usually more moderate in their actions. So, while a college graduate can still be interested in voting (in fact every choice can be somebody who is interested to vote), a thirty year-old who has just moved to a new environment would tend to see things more objectively and act after more consideration and more experience living in that new state.





D. The real incentive for this guy to vote is that a corporate executive is really concerned with money!!! And a right or left wing party can really make a huge difference to the economy. So, the executive would care to vote for somebody who would support the kind of business that he/she is doing.





And of course, I don't know what subject of study does this question belong to. I would be interested to know.
Reply:A,D, and D
Reply:I would say teh High School Graduate. They are complaining about teh government, so they would be motivated to influence change. The computer Programer would be secure enough finanicaly to probably not worry to much about it, the executive is set up- his life is so hetic right now, that following the election would be to much bother (if he did vote he would vote along party lines the same way he has done for 30 years), and teh 30 year old that just moved to a new state probably hasn't register to vote in his new home yet. This is assuming a national government. When it comes to city/ state elections, I'd put my money on teh executive who probably has kids in teh eduational system and might gain a few tax breaks with new laws, etc.
Reply:This happens to be my area of expertise....


The first correlate of voting is age....young people DO NOT VOTE....scratch those under 24.


Secondly, income/education is the second correlate....as income and education rises so does the incedence of voting.


Thirdly, race.....minorities are least likely to vote.





The 'just moved' is a trick....it DEPENDS ON THE STATE....


some states (six to be exact) allow you to register and vote THE DAY of a an election You can read more here: http://www.epic.org/privacy/voting/regis...
Reply:after som pondering, and trying to think like a high school text book lol ok. 19yr-30yr are the hardest ages to get to the polling stations, because they dont believe their vote will make a difference, their lives are usually self absorbed and generally they are removed from the political happenings of the country. Therefore, the 50yr Corporate Exec would be most likely to vote, because he knows what a vote can do for his company. Good Luck!
Reply:I considered myself a diehard voter after seeing 9/11, and couldn't wait to cast my vote come election time; but because I was so caught up in work and school, I kinda got sidetracked and had to do some last minute registration. It took hours for me and my wife to even find the place to cast our votes! (Which turned out to be inside a church...wtf) anyway, I ended up voteing for Al in the end, but my point is sometimes no matter how badly you want to vote, if you are caught up with personal stuff, (which most of us are) you can easly forget to vote, let alone know how in some areas. So, yes, my answer is D. Everyone else is too buisy with jobs/social life to follow through. But the old fart doen't have anything else better to do.


Why is goto in programming frowned upon?

Being a hobby programmer (c++ and any other language I feel like learning) I have read from numerous source that using the


goto keyword is a bad thing and should be avoided.





From what I've read it is avoided because it basically makes your code hard to read/understand, but I think that if used properly it can be usefull.





I also dabble in assembly, and was getting confused with the jmp until I learned about the goto and then it hit me....





jmp is almost exact to goto.





So wouldn't goto help people who want to learn oh say assembly??





I have also found goto helpfull in rare cases.





what about you??

Why is goto in programming frowned upon?
A program statement is like a sentence. It can be direct. It can also be long and rambling, taking you from the court of Saladin the Magnificent to H. P. Lovecraft's dinner table where you will learn he detested fish.





I have no doubt you have found gotos useful. C has a statement called break, which gets you out of whatever loop or switch statement you hapen to be in. There are certainly cases where they are called for. Generally, though, they are so useful in redirecting program actions that they can give you a scope as broad as my sentence with Saladin and Lovecraft. And it makes it very easy to forget that happens after the sentence is complete. The program can hang or terminate without accomplishing its original purpose.





If you expect to be the person maintaining this code until it's finished or the Messiah comes, fine. If not then you are well advised to think of others and plot things from the top down so you do leave the most direct and uncluttered sentences for them to look at you can.





%26lt;/tongue in cheek %26gt;
Reply:Using goto does make you code harder to follow and opens up the possibility that another person that modifies the code will make a mistake. If it wasn't for the use of gosub it might be alright. If one uses a goto after a gosub and before the return then you can imagine how confusing it could become.





If there are several gosubs within gosubs then it gets even worse.


Time is money and all the employers I have worked for do not like spending money on spaghetti code problems.





Top down and modular, that's the ticket


The project role most involved in interacting with users to determine their specific needs is the:?

a)system analyst


b)programmer


C)project manager


D)inteface designer

The project role most involved in interacting with users to determine their specific needs is the:?
Is this a test question or are these your choices? I would say that the Business Analyst or Application Architect are most involved with client requirements. I am a sales rep for a consulting company and that's my opinion for what it's worth. If this is a test and these are my options - C or D would be most involved.

land survey

Why is goto in programming frowned upon?

Being a hobby programmer (c++ and any other language I feel like learning) I have read from numerous source that using the


goto keyword is a bad thing and should be avoided.





From what I've read it is avoided because it basically makes your code hard to read/understand, but I think that if used properly it can be usefull.





I also dabble in assembly, and was getting confused with the jmp until I learned about the goto and then it hit me....





jmp is almost exact to goto.





So wouldn't goto help people who want to learn oh say assembly??





I have also found goto helpfull in rare cases.





what about you??

Why is goto in programming frowned upon?
Goto's can make programs hard to read and understand. That's a good enough reason not to use them. Would Stephen King reference page 217 in his novel if you are at page 41? Exactly.
Reply:Even as a hobby programmer - do you expect to ever have to work on your code after you finish it? Unless you leave yourself extensive comments,





if (x == y) goto z;


a few pages of code


z:





is a lot more confusing than





if (x %26lt;%26gt; y) bypass = true;


if (!bypass) {


    a few pages of code


}
Reply:If you or your team are the only ones who will see the code, then I do not see a problem. If you plan on releasing the code to other people, then it would be best to use other methods.


Which one of the following individuals would be most likely to vote?

A. A 19-year-old high school graduate who likes to complain about the government


B. A 22-year-old computer programmer





C. A 30-year-old college graduate who has just moved to a new state





D. A 50-year-old corporate executive who holds a master's degree in business

Which one of the following individuals would be most likely to vote?
Not really enough info to make an educated decision but I guess D.


Sry misunderstood question thought you meant vote for.oops.


Answers still the same.
Reply:c.
Reply:Just based on that? D. I would need a LOT more info to vote for anyone.
Reply:As a general rule, the likelihood of voting increases with age and intelligence.





So the 50-year old corporate executive is most likely to vote of those listed.





The 19-year old is least likely to vote even though you have profiled him/her as a complainer about government.





I know for sure this is true from TWO sources:





Statistics I have often seen through life.


My own personal experience with people, both young and older.
Reply:I think it is D, older people tend to vote more because I think they realize how important it is to be counted.
Reply:While I suppose it depends on how strongly they feel about what they're voting for, I would say B or D. The corporate executive likes to vote to make sure he can stay wealthy. The computer programmer is young and wants to see if he can improve his life now that he's out on his own. The teenager probably thinks his vote doesn't count or the government fixes the elections. The college graduate is too busy unpacking if he JUST moved to a new state.
Reply:Without looking at the answers, I choose B.
Reply:i'll go with A. being newly eligible to vote, the appeal to do so is there. hopefully, an 19 year old would have learned (recently graduated) that one way to change existing policies and practices is to VOTE for someone who is promising GOOD CHANGE.
Reply:I'd go with C
Reply:I would say C as well, but maybe A would as well. I first voted at 19, because of the same reason.


Developing machine control software.?

I want to write control software. For example to control a drilling machine or lathe. where do i start? what do i need? and what do i need to know? (I am a high level langauge programmer (C#/java)). Some bits and bytes please.

Developing machine control software.?
Use 8086 Microprocessor simulator... You can program using assembly language.....





Use this link to download the software..





http://www.soft20.com/download-10-24528....





You have to know much about the Assembly language instructions to program and control some interfaced devices like Lathe, rotor etc etc......





For even better bits and bytes knowledge use 8085 Micro Processor Simulator, This software needs a Micro Processor Kit anyway you can have the software in Windows too follow this link...





http://www.freedownloadscenter.com/Utili...





Be aware of the set of Instructions u use... this is not even the assembly language here u use Machine codes....Interact with chips directly through your instructions....
Reply:Start with writing a loader... the interface that connects the machine to the computer..... if using java use JNI and C...


you need to have an interfacing equipment that interfaces itself to the computer.... wht you need to worry about is the interface equipment... start my writing code to control it which in turn will control the machine...


hope this helps...
Reply:That's a very specific sort of area, I'm not surei f yo ucna just go into it like that, there's possibly not that many jobs in it at the moment, they must be plenty of other jobs, why pick this.
Reply:You have to write in assembly. May be you can contact an assembly programmer. Check websites like http://getafreelnacer.com/


Java learning procedure?

ok i wnt insight from a java programmer c++ whoever has been around it for awhile .......... Im going for my degree in information and data security but i like the programming world. So independently im gonna take some classes but i have seen as i been trying to learn it that there is alot involved scripting need to be known in the unix/windows world also a knowledge of html, xml E.T.C. is essential. Somebody who has experience programming with java give me some insight on what is essential in learning this language or concept i should say even if that means math classes that pertain to programming

Java learning procedure?
If you had to learn encryption theory in order to get your "information and data security" degree, then you should have enough math to learn any programming language you want.





If not, if you just had to learn about the major PKE packages, security techniques, common attacks, how they work, what their strengths and weaknesses are, etc. I would recommend a good solid background in mid-level college algebra, something that covers the basics of boolean algebra and gets you used to working with abstract expressions.
Reply:One of the most important things in information and data security is communication, so practice the phrasing on your questions. Seriously! Most security folks spend a lot of time communicating in e-mail, face to face, and on the phone!





I think from a programming standpoint, know how the various types of encryption work, and how to create an encrypted channel through data communication. Understand the issues around data at rest and data in transit.
Reply:im new to this so i need to ask u a question about how u can keep asking questions becuz i can do it but once i put another question up i dont know how to keep asking becuz ive only asked 2 questions....

survey software

Which of the following titles is correctly punctuated?

a. Poem: 'Nostalgia,' by Billy Collins


b. Ship: "Queen Mary"


c. article: "What Chat Transcripes Reveal," by Carol Tenopir


d. Story: The Telltale Heart, by Edgar Allan Poe


(Telltale Heart is supposed to be in Italics)








Which of the following sentences is correctly capitalized?





a. Emily's address is 14 Orient Lane, Baltimore, Md.


b. My Father is a computer programmer.


c. His mother is a Doctor


d. Jennifer dreamed of a wedding in Central Park.

Which of the following titles is correctly punctuated?
This smacks of homework. The idea is for you to learn it, not for strangers online to prove they understand the rules for punctuation and capitalization, which we do.





You edit to tell us what you think the correct answers are and why, and maybe someone will tell you whether you're right. If you're wrong, I hope they'll tell you why without telling you the correct answer.





I'm such a dreamer.
Reply:question 1- C Magazine titles are capitilized- articles are in quotation marks.





question 2- A Names, street names, %26amp; city and state are capitilized. If it had said New York Central Park then that would be capitilized because it names the park.
Reply:Sentences a. and c. are correct. All sentences are capitalized correctly
Reply:Punctuation : It is "D"


Sentences : It is also "D"


American history?

1. If you were a specialist working for the National Security Agency, your main job would likely be


A. electronic surveillance.


B. analyzing and breaking coded messages.


C. analyzing data from spy satellites.


D. working in the field to carry out covert operations.





b





2. The largest proportion of federal revenues comes from


A. social insurance taxes.


B. excise taxes.


C. borrowing.


D. personal income taxes.


d





3. Which one of the following individuals would be most likely to vote?


A. A 19-year-old high school graduate who likes to complain about the government


B. A 22-year-old computer programmer


C. A 30-year-old college graduate who has just moved to a new state


D. A 50-year-old corporate executive who holds a master's degree in business





d

American history?
1. B 2. D 3. D
Reply:b-d-a.
Reply:your good except for maybe the third one, thats tricky but i might go with b
Reply:same goes for me


b


d


d
Reply:a


c


d


Looking to switch to MAC but I have some questions?

Hi guys I'm looking to switch to make soon and well I have a few questions that perhaps you all could help me with. First question:





I am a programmer (C++/C#) will there be any trouble programming in either of those languages on MAC?(im sure c++ will be fine but what about C#)??





Second Question:





I am currently in College and most of my classes require programs that are on windows(i.e. visual studio,vmware) is there programs or emulators that can run visual studio inside of MAC?

Looking to switch to MAC but I have some questions?
Well if you want run programs that are compatible with Windows then you should download/buy the Parallel Desktops.





Parallel Desktops Run Windows, Linux, and more side-by-side with Mac OS X on any Intel-powered Mac, without rebooting. With Parallels’ award-winning virtualization technology, you can run Mac OS X and Windows at the same time. You can even drag-and-drop files between desktops.





Here is the website:


http://www.parallels.com/en/products/des...





Good Luck


= )
Reply:MACs are fantastic for graphic design and video editing so it's probably the way to go.





I spent most of my life programming PCs and recently switched to MAC.





It was a little difficult at first but most of the time there are easier short cuts and video editing software is amazing
Reply:you can get vmware fusion on a mac which will solve all of your problems
Reply:I'm not a programmer myself, so I can't help much with the first question, though if you're looking to develop software for OS X in particular, you might want to read up on Objective-C and the Cocoa API, as those are most widely used. The dev tools (Xcode and all the related utilities) are included with every copy of OS X.





As for the second question, any Intel-based Mac (i.e. any Mac made within the last couple of years) can easily run Windows itself, either natively (dual-booting via the Boot Camp utility) or in virtualization with something like Parallels or VMware. If you've got a copy of Windows handy, that won't be a problem for you at all. :)
Reply:You can use Boot Camp


http://www.apple.com/macosx/features/boo...
Reply:i cant see why you wouldnt be able to code in C's. but your visual studio will not work on Macintosh computers. for that you will have to either buy mac versions (if they exist) or dual boot. but in that case you may as well save some cash and buy a windows installed machine


Please help me with these questions?

Which sentences is the hypen used CORRECTLY?


A. Maisey- my beagle- loves to run in the field.


B. She wore her hair in a closely-cropped style.


C. Jan's house was painted light-blue.


D. We stayed at a first-class hotel.





Which sentences symbol is CORRECTLY.


A. Rachel's reant has gone up to 745$ a month.


B. Jason bought three books and two magazines.


C. Marilla was hired as a paralegal at Barnes, Johnson %26amp; Laird.





Which titles is CORRECTLY punctuated?


A. Poem: 'Nostalgia,' by Billy Collins


B. Ship: "Queen Mary"


C. Article: "What Chat Transcripts Reveal," By Carol Tenopir


D. Story: The Telltale Heart, by Edgar Allan Poe ( the telltale heart is italicized)





Which is CORRECTLY capitalized?


A. Emily's address is 14 Orient Lane, Baltimore, Md.


B. My Father is computer programmer.


C. His mother is a Doctor.


D. Jennifer dreamed of wedding in Central Park.

Please help me with these questions?
1.) D


2.) B and C. But if you want a single answer, i'd go with C


3.) C


4.) A





Hope this helps :)
Reply:look like you are trying to get some one to do you home work.

survey research

Civics help!?

1. If you were a specialist working for the National Security Agency, your main job would likely be





A. electronic surveillance.


B. analyzing and breaking coded messages.


C. analyzing data from spy satellites.


D. working in the field to carry out covert operations.








2. The largest proportion of federal revenues comes from





A. social insurance taxes.


B. excise taxes.


C. borrowing.


D. personal income taxes.





3. Which one of the following individuals would be most likely to vote?





A. A 19-year-old high school graduate who likes to complain about the government


B. A 22-year-old computer programmer


C. A 30-year-old college graduate who has just moved to a new state


D. A 50-year-old corporate executive who holds a master's degree in business





4. Which one of the following statements is most accurate for law enforcement?





A. Law enforcement agencies are employed by the court system.


B. Ordinary police officers aren't required to understand how to gather evidence.





C. Law enforcement officers are mainly required to uphold the law.





D. There is no county law enforcement department.

Civics help!?
1) B


2) D


3) D


4) C


What's a good Javascript book for experienced programmers?

Any recommendations on the best way to learn Javascript for experienced programmers (C/C++/Java)? Any good books to get started with?

What's a good Javascript book for experienced programmers?
go to http://ejohn.org and order his book! the man is a genius and really understands how to do JavaScript right!
Reply:Learn Advanced Javascript Programming (Paperback)


by Yehuda Shiran (Author), Tomer Shiran (Author)





(you'll also need either


Javascript the Definitive Guide


or


Dynamic HTML the Definitive Guide





...or both


Ok i hate this subject i dont undr stand it a bit lol so can u help plz!!?

If you were a specialist working for the National Security Agency, your main job would likely be





A. electronic surveillance.


B. analyzing and breaking coded messages.





C. analyzing data from spy satellites.





D. working in the field to carry out covert operations.














2. The largest proportion of federal revenues comes from





A. social insurance taxes.


B. excise taxes.





C. borrowing.





D. personal income taxes.














3. Which one of the following individuals would be most likely to vote?





A. A 19-year-old high school graduate who likes to complain about the government


B. A 22-year-old computer programmer





C. A 30-year-old college graduate who has just moved to a new state





D. A 50-year-old corporate executive who holds a master's degree in business














4. Which one of the following statements is most accurate for law enforcement?





A. Law enforcement agencies are employed by the court system.


B. Ordinary police officers aren't required to understand how to gather evidence.





C. Law enforcement officers are mainly required to uphold the law.





D. There is no county law enforcement department.














5. Suppose you're interested in finding information on your senators and representatives and on current bills before Congress. Which one of the following resources would be best for this purpose?





A. Your public library


B. Your local newspaper





C. Television





D. History books














6. Under the Constitution of the United States, you may not be deprived of life, liberty, or property, without





A. due process of law.


B. being charged with a crime.





C. due respect for law.





D. being suspected of a crime.














7. A war in Mexico would be under the _______ Command.





A. Central


B. Pacific





C. Southern





D. Northern














8. The outcome of the 2000 presidential election was decided by a





A. careful recount of the Florida votes.


B. majority of the popular vote.





C. majority vote of the electoral college.





D. decision of the Supreme Court.














9. You don't really approve of the idea of political parties. However, you're known as a Federalist and are soon associated with that party. Chances are good that your name is





A. James Madison.


B. Abraham Lincoln.





C. Thomas Jefferson.





D. George Washington.














10. The XYZ PAC operates on behalf of the XYZ interest group. Which campaign behavior of the XYZ PAC would be against current law?





A. The PAC creates its own campaign for candidate Kroll and contributes to the campaign of candidate Loon.


B. The PAC contributes $6,000 to candidate Kroll and $2,000 to candidate Loon.





C. The PAC contributes $4,000 to the campaigns of Kroll, Loon, Marble, and Noonkester for a total of $16,000.





D. The PAC contributes $2,000 to Kroll and $4,000 to Loon because both claim to support the PAC's legislative goals.














11. During the Cold War, the United States foreign policy of containment consisted of





A. wars and covert operations.


B. wars and mutual assured destruction.





C. deterrence and covert operations.





D. deterrence and mutual assured destruction.














12. To become a citizen of the United States, you must





A. be at least 21 years old.


B. pass an English and government test.





C. have lived in the United States for at least six months.





D. file a request form in a federal court.














13. A basic position in American foreign policy has been that America must defend its foreign interests related to trade and security. The main foreign policy position opposed to this American policy is called





A. federalism.


B. imperialism.





C. militarism.





D. isolationism.














14. You're most likely to pay your county or town taxes in the form of a/an _______ tax.





A. property


B. excise





C. sales





D. income














15. Which one of the following political interest groups falls into the organized labor category?





A. National Education Association


B. American Rifle Association





C. National Broadcasting Corporation





D. National Audubon Society














16. By tradition, when does the presidential campaign begin?





A. When a candidate is officially nominated at the national convention


B. After a candidate has gained enough electoral votes in the primaries





C. In September, following the national convention





D. With the New Hampshire primary














17. Which one of the following is an example of an entitlement?





A. The right to vote


B. Receiving Social Security





C. Freedom of speech





D. Serving in the military














18. In the United States, your legal right to express your political opinions to government officials is granted under the _______ Amendment.





A. First


B. Second





C. Fourth





D. Fourteenth














19. Why does the Central Intelligence Agency have more freedom of action than other federal agencies?





A. Both its budget and operations are secret.


B. It carries out U.S. foreign policy under the FBI.





C. It answers to Congress only for its financial needs.





D. The agency doesn't report to anyone.














20. In general, you would expect the platform of a political party to





A. lead to a national convention.


B. guide the political issues of the party's candidate.





C. consist of party leaders called planks.





D. determine the outcome of a general election.

Ok i hate this subject i dont undr stand it a bit lol so can u help plz!!?
uh...tell us again why we are doing your homework?





Crack a book. It won't hurt long and it might even bee good for you
Reply:Stay in school, Study hard, and one day you to can be a liberal!!!!





Get off the net, and do your Homework, before your mommy catches you!!!!!
Reply:I think your teacher wants you to do your own homework lulz!


Please tell about the maths books and maths sites so that i can excel in M.C.a. entrance exams?

send it on my id arjun_programmer@yahoo.co.in

Please tell about the maths books and maths sites so that i can excel in M.C.a. entrance exams?
My transfer counselor just told me yesterday about the website for math.com.





She said that it helps many different levels of education in math.

survey for money

Is it right to get into call center for those who have gave their C.B.S.E. Board exams this year only?

Looking for job as well as studying %26amp; becoming a programmer/compiler.

Is it right to get into call center for those who have gave their C.B.S.E. Board exams this year only?
Do have some degree first.


but how can one become a compiler!!!!!!!!


u can be a programmer.


does programming attracts u..then u can CODE....


Which university best for studying distance education M.B.A or M.C.A in Chennai?

i furnished B.A(co-operation) in Quide-milleth college support by madras university after that i furnish in year computer course with program now doing trainee(Hadware,Programmer) in madras fertilizers ltd i more intrest to do above the any one of the degree for better my carrer please if you know please say good university for study correspondence for me.


thanking you.

Which university best for studying distance education M.B.A or M.C.A in Chennai?
You can go for MBA or MCA from ICFAI university through correspondence. its a good one and the reputation is very high , please visit the website icfai.org for more details or send a mail to haisumith005@gmail.com
Reply:the same one where you did your ug.


Madras University.





If you really want a good quality, go for Pondicherry University(Central University)
Reply:Anna university


Madras university
Reply:You can do MBA distance Learning from


IICT Business School lucknow


Department of Distance and Open Learning


website http://www.iict.in
Reply:Annamalai University is one of the best for Distance education


Which computer language should I learn: Visual Basic, Java, C++ or others?

Which will be the most useful now? I want to be a computer programmer.

Which computer language should I learn: Visual Basic, Java, C++ or others?
I think you may want to try learning java or c++. I currently am minoring in Computer Science Engineering along with my Mechanical Engineering degree and I have taken C++ and it's alot of fun. As for a programming environment you can download open source stuff such as Eclipse which is awesome, because you can set it up as you want for your own needs. Many of my classmates use Eclispe because it is open source and flexible or you can try Dev C++ which is what I have on my computer as well and it is also free to download. I dont remember the website for Dev C++, but the one for Eclipse is www.eclispe.org ... good luck!
Reply:Start of with Visual Basic as its the simplist...





Choosing between Visual Basic 6 and .NET is something to do with you...


.NET requires the .NET Framework to be installed on the machine...low performance PC's can't install them


On the other hand, new PC's and new versions of Windows come with .NET Framework





VB6 requires only a 3 MB runtime files, which is bow icluded in WinXP, Vista, and should be included in the new Windows Vienna as well...





Another thing to think of is the platform you want to develop on:


If Windows, then simply go for a Microsoft Based programming Language...really high integrity


If Linux, wtc, probably go for C++


If you want to work on Multiplatform, then go for Java





PS: Visual Studio .NET 2005 Express Edition (Free for personal use) has a lot of features that really facilitates programming...





Advice:


Never stick to one programming Language, learn more than one then choose the one you can put more performance in...





As for a start, go for Microsoft based Programming Languages...


How do i change binary bit numbers to decimal in C++? ( Mircosoft Visual studio )?

For example,





when i key in 00010001, the result will be equal to 17?








Programmer expert please help!

How do i change binary bit numbers to decimal in C++? ( Mircosoft Visual studio )?
an inefficient, but easy to understand method:


start with a variable 'total' set to 0


as each character is entered, double the 'total' and add the new digit (0 or 1)





to make it interesting, you can even display the running total elsewhere on the screen!


for your example it would display:


0


0


0


1


2


4


8


16


17
Reply:look for the keyword 'ascii' to convert binary to decimal or viceversa
Reply:Use a for loop to calculate xn*2^n-1+x(n-1)*2^(n-2)+.... +x0


Else contact a freelance programmer for helping you doing your project assignment. Check websites like http://getafreelnacer.com/

survey questions

Which language is easier for an absolute beginner: Java or C++? Also, what should I do to begin learning?

I am an aspiring programmer. Well, actually I've really never worked much code in my life, but I am enthusiastic about learning. Where/What should I go/do to begin to learn a language? And what language is more appropriate to learn for a beginner, not necessarily easier? 10 points to anyone who'll help me!

Which language is easier for an absolute beginner: Java or C++? Also, what should I do to begin learning?
maintain the order


1) C(gives you ability to develop logic)


2)C++(Introduction to oops)


3)Java(This one very functional language has semantics n syntax dirived from C%26amp;C++)





hope this helps


Cheers:)
Reply:learn c++ first





c++ is the mother of all languages
Reply:I think c/++ are best avoided to begin with.





The first points to learn initially (regardless of language) are:





1. Variables


2. IF (else, endif)


3. Arrays (collections/lists)


4. Loops





I'd pick java over c++ to learn.
Reply:Java is a generation later than C/C++ so probably a better bet, imvho.
Reply:hmmm... visit





http://www.firstwebschool.info





and ask for a FREE information pack..... show your interest in JAVA and C++,,,, cheers


How can I find a C# or VB component that enable me to send data from PC to Fax?

I'm a programmer, try to send pictures %26amp; Documents from a windows application to fax.


It is part of my project...


I hope to find some one to help me on it...

How can I find a C# or VB component that enable me to send data from PC to Fax?
There are several web articles out there that can help you get started, i Just searched for 'C# send fax'





http://www.interfax.net/en/dev/webservic...





http://forums.microsoft.com/MSDN/ShowPos...





http://www.oneoutbox.com/samples/sample....











I have not done this myself, so I don't know the validity of the articles I looked at. It appears some operatins systems don't expose an API to the fax - you may need to make sure you get what you need included into your application.
Reply:http://www.interfax.net/en/dev/webservic...





You dont even need a fax with interfax :)


Getting input and add the value in C++?

I want a program that get numeric inputs from user. User inputs a single value like 123 but the program treat it and add the value like 1+2+3=6.


I'm not a programmer, its just a subject in my class so please help me in this.

Getting input and add the value in C++?
Just keep trying if you want to learn. Well answer to your this question is:-


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


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


void main()


{


clrscr();


int n,r,sum;


cout%26lt;%26lt;"Enter the number:";


cin%26gt;%26gt;n;


while(n%26gt;0)


{


r=n%10;


sum=r+sum;


n=n/10;


}


cout%26lt;%26lt;"Result:"%26lt;%26lt;sum;


}
Reply:I'm sorry but i won't help you on this issue. If you are taking a class that means you are learning some programming. When i took my 2 year computer program it included some C++, Visual Basic, and other languages. I never asked someone else to write the program just cause i wasn't a programmer. If i had done that what would I have learnt? and the same goes for you, you are in a course that has some programming so what will you learn if someone else does all the work for you?





The best thing is to ask the instructor for some help.
Reply:This is the logic of this programme. I am also a student %26amp; giving you a code of TURBO C++.








int number,sum=0,rem=1;


cout%26lt;%26lt;"Enter a number ";


cin%26gt;%26gt;number;


while(number%26gt;0)


{


rem=number%10;


sum=rem+sum;


number=number/10;


}


cout%26lt;%26lt;"Sum = "%26lt;%26lt;sum;


What do I need to start learning C programming?

So I'm supposed to be a programmer for a robotics team next year. The only problem is that I have absolutely NO CLUE where the heck to start. Should I just find some code and start typing in Notepad, or do I need to download something first? Also, if I need to download something, could you send me a link, pretty please?

What do I need to start learning C programming?
first you need a compiler.. you could use devC or visualbasic for that.. then you need references..





you could use the links here:


http://www.geocities.com/naif_2pac/cpp.h...


http://www.wtvl.net/mike/webjr/begcpp.ht...


http://www.loirak.com/prog/ctutor.php





good luck!!!
Reply:u need a compiler for that
Reply:You need some sort of compiler/interpreter I recomend the Bloodshed IDE its top notch and free


http://www.bloodshed.net/devcpp.html

surveys

Kindly suggest me a small project in c++ which can help me in improving my command over the language?

i m a engineering student. and i know this language but still not confident as i have never made any project....i dont know where i m in my programming skills..please do help as i want to make my career in programming...also i have a bet wid my friend as he says girls cant be a good programmer ..and i am very keen to win this bet...plz do help me how i can make my programming best......thx

Kindly suggest me a small project in c++ which can help me in improving my command over the language?
Write an application that takes the following xml, from an external document, and generates a radio button for each 'Colour' item.





%26lt;colours%26gt;


%26lt;colour hex="#FF0000"%26gt;Red%26lt;/colour%26gt;


%26lt;colour hex="#00FF00"%26gt;Green%26lt;/colour%26gt;


%26lt;colour hex="#0000FF"%26gt;Blue%26lt;/colour%26gt;


%26lt;colour hex="#FF9933"%26gt;Orange%26lt;/colour%26gt;


%26lt;/colours%26gt;





When an item is selected change the background to that colour.





Further additions:


Allow user to select the xml file which contains colours.


Allow choice to be saved.


Allow user to add additional colours and save.


Allow user to remove colours and save.


Allow users to generate a new xml file.





This is pretty simple but if your a beginner it will introduce you some new techniques.
Reply:hi,design editor,paintbrush etc


How do I build a C++ program that produces a .txt file?

I'm a beginning programmer and I've made a few simple programs that deal with numbers but I wanted to develop a program that is just a simple word processing program with no GUI but just DOS. I know how to accept all of the typed text but creating a filename and allowing someone to choose were to save it is what I need help with. Please give me a hand. Thanks.

How do I build a C++ program that produces a .txt file?
http://www.cplusplus.com/doc/tutorial/fi...
Reply:very simple with c++





you need variable type FILE *


FILE *file; char string[]="hello";


file=fopen("whatever.txt","w");


fprintf(file,"%s world",string);


fclose(file);





look up fread and if u want, fwrite, theres plenty of functions for file input output but all i ever use is


fopen, fclose, fprintf, fread, and fwrite





the second parameter of fopen specifies the mode, the modes i am familiar with are r, w, a, ab, rb, and wb


whether or not the b is present specifies binary or not, if it is binary, special character conversions will not be performed, if not binary, it is text





r means read, w means write, a means append, basically self explanatory
Reply:c++


here is your hand


: im clapping


c++ is mind boggling


Have started self learning of C++. Pls refer me a book which goes from beginner to advance level.?

Pls suggest is for computer gaming programming java knowledgege is enough.


Pls suggest what should be done in course of self learning to be a good programmer

Have started self learning of C++. Pls refer me a book which goes from beginner to advance level.?
While the Creator's book is good, it's also dull. For a C language approach, try Expert C Programming by Peter Van Der Linden. You'll have loads, and I mean loads of fun reading it.


Don't go into complicated stuff at the beggining (STL, templates, classes). Learn the language, its peculiarities, do about a hundred simple programs, then start with classes. After about a year of practise, start doing an interesting project (maybe a file manager, a small (and I mean small) game (Battle Ships or anything that pushes your buttons).


Learn some algorithms today! While knowing a programming language gives you a degree of power, nothing is more powerful than knowing your algorithms, because then the language you use won't really matter (well, almost).


Try backtracking, greedy, divide and conquer and after you've mastered these, move to more advanced programming methods, like dynamic programming (no, I'm not talking about pointers).


Learn data structures. Basics: stacks, trees (binary, red-black, and so on), vectors, matrices, heaps, lists, queues. Implement them using classes. Implement them using templates. Probably the best book for data structures and algorithms is 'Data Structures and Algorithms' by Cormen and Co.


You'll need to learn some design language (UML?) eventually, but that's another story. Design Patterns by Gamma and Co. (The Gang of Four) comes in handy.
Reply:For gaming i dont know of any books like that but for security code and stuff try secure coding in c and C++ its a good book
Reply:"Teach Yourself C++ in 24 Hours"


By Sams Publishing, written by Jesse Liberty





I would suggest keeping notes as you're reading, and frequently rereading your notes. Also, doing any tutorials you come accross - however mundane they appear. Ever bit of practice will help in the long run.
Reply:The book by Stroustrup(creater of c++) is a good reference.


What should I learn after C++?

I want to become a programmer.

What should I learn after C++?
It depends on what type of programmer you wish to become. C++ is geared towards systems programming but you can learn a lot of important programming concepts by studying it.





If your goal is to start building applications that support a business function, you probably want to start reading about .NET. C# is one of several .NET languages that you might find easy to learn after studying C++.
Reply:oh i kno u have to learn this thing ...it shows it in the video


http://www.youtube.com/watch?v=fCSeTHFvO...





don't thank me........no problem
Reply:Hi!


More advanced C++..and perhaps a website langauge..like Perl. I love Perl..I've used it for years.





Here's some free programming books:





http://mindview.net/Books/DownloadSites





Enjoy!
Reply:I'd go with Java or Linux programming. Or maybe xml or .net. Avoid assembly, HDL, and fortran.

survey monkey

I just downloaded the Intel C++ Compiler, and I was wonder how i am supposed to make a program with this.?

I'm a newbie programmer, and I just got this compiler. I want to know how i'm supposed to start a new file to make a program in, as this compiler runs as a command line compiler.

I just downloaded the Intel C++ Compiler, and I was wonder how i am supposed to make a program with this.?
You need to write source code first. You write a program in a text editor like notepad, then save it, and run nameofcompiler nameofsource and it saves it as a binary file that you execute.





There are some C++ Development Environments. Check out Bloodshed Software's Dev-C++
Reply:icl some_sourcefile.c


You do know the Intel website does have documentation.
Reply:OMG a command line compiler. those are ancient.


nowadays ppl use Visual Studio .NET for writing programs in C++ (well actually Visual C++ .NET). i know it's expensive, but it is the best tool for the job





sorry i can't help with command line compilers


Who would directly oversee the work of a data-entry operator and a systems programmer?

a. chief information officer


b. database administrator


c. system design


d. preliminary investigation

Who would directly oversee the work of a data-entry operator and a systems programmer?
A - CIO - wouldn't normally manage the two positions unless its a small IT group.


B - DB Admin - maybe, as DB admin normally deals with managing database. Data Entry and programmer may fit into this category.


C - System Design - maybe, as the system designer develops programs and may need the two positions to help enter and manged the programs


D - PI - no


Free Stuff for Visual C++ 6.0 for Dummies?

I have just started programing and i am looking for some free content online which could help me to take off with the basics. I can't use new version of visual Basic because i am using this version in my institute, so i need something which can help me to understand it to some extent, or atleast could clear my concepts related to programing.





If you know any site, or if you have any link to some file or anything which you think can help any new programmer, then please do share it with me. Thanks a lot.

Free Stuff for Visual C++ 6.0 for Dummies?
http://answers.yahoo.com/search/search_r...
Reply:http://www.codeproject.com


http://www.codeguru.com --


I hope, it will be enough at least for several years :-)


In C++ What is a statement that associates an indentifier with a object, a function, or data type...?

so that the programmer can refer to that item by name

In C++ What is a statement that associates an indentifier with a object, a function, or data type...?
a declaration





example:


int count; defines count as an integer
Reply:you can use #define


eg


#define IsWhiteSpace(c) ((c)==' '||(c)=='\t'|| \


(c)=='\r'||(c)=='\n')





...


...


while (IsWhiteSpace(*p))


p++;


...


...





or


#define CR 13


#define LF 10


#define ESC 27





or use typdef - very handy for creating named structures etc

online survey

Is it learning c#.net enough. Should I learn java too.?

After getting Phd in Physics I decided to do what I have always wanted to, become a real programmer. I was thinking about Java first, then I realized that Windows has about 90% of the market. Besides I think it easier to learn .net beacuse of Visual Studio and single vendor MS. I know that i am leaving out here server market witch is not dominated by Microsoft. But I would rather use here Rails or ASP.Net. Is there a point these days to learn Java. You say it is cross platform. Yes it is but reality is that Business apps are mostly written under Windows, on the server side I would use ASP.Net or Rails. I can live without programming for Mac. What do you think. My point is that it may not be necessary these days to learn Java if you start when .net is an option.

Is it learning c#.net enough. Should I learn java too.?
It depends on whether you enjoy working in a non-Microsoft environment. Some people love IBM and Sun environments, and some people find them maddeningly frustrating.





Personally, I love the Microsoft development model. I use .NET for almost everything I do, and I have been very successful at it - career-wise and with regard to the products I have had a hand in. There are other people who would pretty much tell me to my face (not too few of those here on Y! Answers) that I am an idiot/communist/fascist/moron/ all-around-jackass for preferring .NET. But again, it is really just a preference. I know a number of people who flourish in a Linux environment developing sites with PHP and MySQL, and I work with great, smart people who excel in an all-Windows environment, with .NET and SQL 2005, writing online banking software for one of the biggest banks in the world. The point is, you can write great software regardless of the language. Don't let anyone tell you that you won't be able to "get it" or that one forces you to be a better programmer than another.





I tend to think of Java as the Neanderthal predecessor of .NET - in my opinion, Microsoft took all of the things Java got right and incorporated them into .NET, and fixed a number of the things Java got wrong.





I also like the unified programming architecture model - some people deride it as narrow and undemocratic, but I like having a clear hierarchy of how a programming framework is going to work - Microsoft says so. That means everything in the libraries are going to be 100% consistent. There's no trying to account for differences in taste and different programmers' opinions on how something should work. I think that a large number of other programming environments that are considered "better" by much of the Open Source side of things tend to suffer from this scattershot effect, trying to please numerous voices but never hitting all the targets.





Also, regarding the server market... it really depends on how you break down "market". For small-to-mid sized development, PHP and Perl dominate the market. For enterprise development, .NET dominates the market - last stats showed that .NET has 60% of the enterprise development market, with all other platforms fighting over the remaining 40. Java is a secondary player in the web/server arena.





There are plenty of reasons that Java is good, but I won't go into them because I think the reasons I like .NET better have more weight. But again, it's a personal preference. Don't let anyone tell you one is better than the other for x, y, or z.





It will never, ever hurt to have more than one framework under your belt. Learning .NET *and* Java will only make you a better programmer. But if you are trying to decide between one and the other, I like .NET.
Reply:Yes!!!





I think it's important to understand that you need to be an excellent programmer first, and then good with specfic languages second.





The reality is that in order to get any software job, you need have experience with the software being used at the time. But to get that, you need to be a good programmer in general. Java and C++ are better than ASP.net when it comes to being a better programmer, becasue while it is often easier to do things with ASP.net, it's even easier to use ASP.net if you know JAVA well. The best java programmers, are the ones that know C++ and can tell you why JAVA is better. The problem with the MS based products is that they force you to do things in the MS way, which doesn't cross over well, and in fact, isn't even the best way to use MS in many ways.





Also, have a solid understanding relational database, and object theory. Once you have the background down, you'll be able to dance into any environment and product and stand toe to toe with the best.





I know people with PHDs in Physics, who are now in software, As far as I know, they are all using Java.
Reply:Fu(k Java! I have worked in both for years and .NET is far superior. As you mentioned, market share ensure employability and what's the point unless you are the ultimate nerd and just program for "fun?"





Anything you can do in Java (except writing "cross platform" you can do in .NET. Plus, .NET may become "cross platform" soon enough anyway.





C++ has a niche market (for graphics, device drivers, high-end performance libraries). For business applications (where the money is) go .NET.
Reply:so far, all the answers are pretty much accurate. You will probably NOT find much consensus on what is good and what is bad. I have the same disagreement with a coworker over .NET %26amp; MS-SQL Vs. PHP/MYSQL.





One thing I KNOW is clear.


Learn to get your logic perfected in such a way that you can translate your Pseudocode into a language of your choice. LOGIC is the one thing that doesn't change, only the syntax does. If you can think logically, you can code in just about any language.





Study the language you like the best, and then dabble in others just in case you are called upon to change code.
Reply:NO! learn Java and C++! I am so thankful I did.
Reply:I think you should ask yourself what market you'd like to work in.





Wanna develop games? Shoot'em ups? Then C++ is the way to go.





Wanna make a lot money, even if it's in boring environments such as banks? Go with Java.





Want a lot of choice, not necessarily paid extremely well, and you're no interested in games programming? Go with C#.


DBASE-III or Foxbase (Foxpro) app for Web? If not, what is next-best for a dBase programmer?

This is a question from a "dinosaur" who has no experience with C, SQL, or Web-based apps or programming: What is the best tool (or service) for creating an online match-making application (database) for someone who has only worked in Foxbase/DOS?





Opps, also this dinosaur can't write a bubble-sort code in Basic, either.





Thanks in advance for all suggestions.

DBASE-III or Foxbase (Foxpro) app for Web? If not, what is next-best for a dBase programmer?
u can learn visual foxpro 9.0 service pack 2 and strat developing.


What Is C# Language(Computer Language) Is it Has Any Thing New in It ? Please Tell Me About It.?

This Is Question For Computer Programmer Please Give Answer Intrestingly..From That I Can Get Some Thing.

What Is C# Language(Computer Language) Is it Has Any Thing New in It ? Please Tell Me About It.?
C# is an extended version of C++ rather you can say it has been put as an alternate to java. Its syntax is much similar to java. It is complete object oriented. Now a days C# is widely used as a language in .NET


So if you are planning to go for .NET you can go for C#.
Reply:nowadays its is know as C++ http://en.wikipedia.org/wiki/C%2B%2B





as C is older and gives less possibilites





anwayy check this out





http://en.wikipedia.org/wiki/C_Sharp
Reply:C# is an advanced vesion of C and C ++. It has many features. It is an OOPS - Object Oriented Programming Language.
Reply:hai


follow this link


http://msdn.microsoft.com/vcsharp/langua...
Reply:best ever


What is c++ and those other things used for?

I want to ba a game programmer, and I need to know what these "programming languages" are.

What is c++ and those other things used for?
They are codes of reserved words and symbols used in computer programs, which give instructions to the computer on how to accomplish certain computing tasks





Programming languages are not about creating programms, but a way to "communicate" with/"provide" instructions to your computer by using the "language" your computer holds.





Here is a website for C++ beginners: http://www.cplusplus.com/doc/





Wikipedia is a good site that you can find more information: http://en.wikipedia.org/wiki/Programming...
Reply:from my own experience in the industry.....any language can be used to program a game.





c++ is a standard right now for beginning programmers to learn on because it is object oriented.


We used Visual Basic where I worked.





What you need to do is get a book on C++ or VB and go from there would be my best advice.


-Dorath20
Reply:Here is a definitive guide from Wikipedia - http://en.wikipedia.org/wiki/Programming...
Reply:The other answers have given some good starting points. I'd suggest that if you're interested in working on games, you might want to start with something simpler than C++, since it's pretty hard to learn for a beginner.





It's easier to learn Visual Basic or Java than C++. You also should take a look at games that are scriptable. Designing "mods" for these games can be a lot of fun, and again is easier than starting out with C++

salary survey

When is C# 3.0 coming out?

I'm preparing to interview Anders Hejlsberg, the programmer behind the language, and need some basic facts straightened out first.

When is C# 3.0 coming out?
That is a good question to ask at





http://www.babydev.com


In Visual C++, I want to read a string from a text file, and assign it to a variable?

But for some reason I have programmer's block and am not quite sure of how to do it. I guess that's what happens when you've been looking at code for three days straight, all day long. I have attempted to do so by trying to force myself to think creatively, but my attempt is quite obviously flawed.





For instance, I have a variable called "fullscreen_x". I want this variable to be assigned information from a specific point on a specific line of a text file (like a user configuration file).





Basically, I just want to know how to read information from a text file. Thanks

In Visual C++, I want to read a string from a text file, and assign it to a variable?
Fred: A disgrace how you answer straight away with full code; you are encouraging laziness. Give hints and algorithms and let the asker implement them rather than showing up.





For the asker:


one of many variation to solve your problem would be:


1.) Read the file


2.) store the content into a data structure (vector, list ...etc.)


3.) Implement a search module which will iterate through that data structure


4.) Tokenize the search result and format it


5.) Assign that result to the variable
Reply:I do it somewhere in there.....I'm to lasy to pick it out....its part of fstream...that is how you open a file read from it into a string, then output to a file, this was compiled with GNU though...hope it still helps














big_int_calc.cpp





A program that will read in a large integer from a file then preform calculations on the number. It will then output the result into another file.








*/





#include%26lt;iostream%26gt;


#include%26lt;fstream%26gt;


#include"big_int.h"


#include"char_to_int.h"





int main(){


//ask the user for options and store as an integer


int option;


std:: cout %26lt;%26lt; '\n'%26lt;%26lt; "Enter an option: " %26lt;%26lt; '\n';


std::cout %26lt;%26lt; "1. Read a big intger from file and add" %26lt;%26lt; '\n';


std::cout %26lt;%26lt; "2. Enter big integer,and multiply by 10^n" %26lt;%26lt; '\n';


std::cout %26lt;%26lt; "3. Multiply an integer read from file" %26lt;%26lt; '\n';


std:: cin %26gt;%26gt; option;





//big int to store result in


big_int result;


//big int to store input data


big_int in_data1, in_data2;





if(option == 1){


//variable to store the file name


char file_name[20];





//ask the user for the name of the file they would like to read from


std:: cout %26lt;%26lt; "Enter the file name you would like to read a big integer from: ";


//input of the file name


std:: cin %26gt;%26gt; file_name;





//opens the file, if file is not opened error is output


std::ifstream in;


in.open(file_name);





// outputs error if needed


if(!in){


std::cout%26lt;%26lt; "Error cannot open file" %26lt;%26lt; '\n';


};





//read the data from the file into a C-array that is a member of the class big_int











int index = 0; // variable to try and make the array size itself


bool second_num = false; // variable to declare when to start second number input


int i = 0; //i is used as the index, but is also the size of the array for in_data1


while(!in.eof()){


char temp;


in.get(temp); // stores the value of the char read in into temp





if(temp != '\n' %26amp;%26amp; temp != '+'){ //filters new line char and +





if(temp == ';'){ // checks for the second number





second_num = true; //sets the value of second num to true once ; is read


// the size of the first big int will be i -1


i = 0; // resets the index


};


//reads first number


if(second_num == false){


in_data1.num_array[i] = char_to_int(temp); //stores value as integer in big_int data type


++i;


in_data1.set_array_size(i); // sets the size of the array


};





//reads in second number with filters


if(second_num == true %26amp;%26amp; temp != ';'){ //filters out ; that may be at the end of the file


in_data2.num_array[i] = char_to_int(temp); //stores the value as an integer in big_int


++i;


in_data2.set_array_size(i); // sets the value of the array size


};


};


};





// variable that decides if user wants to output to screen or file


int result_option;


if(option == 1){


//calculates result


result = in_data1 + in_data2;


//ask user for the input of the option


std::cout%26lt;%26lt; '\n' %26lt;%26lt; "To output result to screen enter 1, to output to file enter 2: ";


std:: cin %26gt;%26gt; result_option;


result = in_data1 + in_data2;


if(result_option == 1){


std::cout %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


result.output();


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


};





};





// outputs to file if option is 2


if(result_option == 2){


//calculates result


result = in_data1 + in_data2;


//ask the user the name of file to write to


std::cout %26lt;%26lt; "Enter the file name to write to: " %26lt;%26lt; '\n';


char outfile_name[20];


//declares the file to be written to


std::cin %26gt;%26gt;outfile_name;


std::ofstream outfile(outfile_name, std::ios::app);





// format output


outfile %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


for(int i = 0; i %26lt; result.size(); ++i){


outfile %26lt;%26lt; result.num_array[i];


if( i % 50 == 0 %26amp;%26amp; i %26gt; 0){ //starts new line every 50 char


outfile %26lt;%26lt; '\n';


};





};


// output of ; at end of file


outfile %26lt;%26lt; ';';











};


};





// declares a big int entered int which is entered by the user


big_int entered_int;


if(option == 2){


//ask the user what they would like to do with the result


int output_option;


std::cout %26lt;%26lt; "To output to screen enter 1, to output to file enter 2: ";


std::cin %26gt;%26gt;output_option;


char temp;


char int_in[500];





//inputs the big integer to the big_int class array


int index = 0;


std::cout %26lt;%26lt; "Enter big integer with e to end input: " %26lt;%26lt; '\n';


//uses sential value to end input


while(std::cin%26gt;%26gt; temp){


if(temp == 'e'){


break;


};


//converts the char to integers


entered_int.num_array[index] = char_to_int(temp);


++index;


};


//inputs the value of n


entered_int.set_array_size(index);


std::cout %26lt;%26lt; "Enter n (10^n) n=";


int n;


std::cin%26gt;%26gt; n;


for(int i = 0; i %26lt; n; ++i){


//adds 0's on the end of the array


entered_int.num_array[entered_int.size()... = 0;


};


// sets new array size


entered_int.set_array_size(entered_int.s... + n);


if(output_option == 1){


std::cout %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


entered_int.output();


};





if(output_option == 2){


//writes to file if user chooses that optioin


std::cout %26lt;%26lt; "Enter the file name to write to: " %26lt;%26lt; '\n';


char outfile_name[20];


std::cin %26gt;%26gt;outfile_name;


std::ofstream outfile(outfile_name, std::ios::app);





//formats output with 50 char per line


outfile %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


for(int i = 0; i %26lt; entered_int.size(); ++i){


outfile %26lt;%26lt; entered_int.num_array[i];


if( i % 50 == 0 %26amp;%26amp; i %26gt; 0){


outfile %26lt;%26lt; '\n';


};





};


//adds ; at end of file


outfile %26lt;%26lt; ';';











};


};











// variable that decides if user wants to output to screen or file


int result_option;


if(option == 3){


//variable to store the file name


char file_name[20];





//ask the user for the name of the file they would like to read from


std:: cout %26lt;%26lt; "Enter the file name you would like to read a big integer from: ";


//input of the file name


std:: cin %26gt;%26gt; file_name;





//opens the file, if file is not opened error is output


std::ifstream in;


in.open(file_name);





// outputs error if needed


if(!in){


std::cout%26lt;%26lt; "Error cannot open file" %26lt;%26lt; '\n';


};





//read the data from the file into a C-array that is a member of the class big_int











int index = 0; // variable to try and make the array size itself


bool second_num = false; // variable to declare when to start second number input


int i = 0; //i is used as the index, but is also the size of the array for in_data1


while(!in.eof()){


char temp;


in.get(temp); // stores the value of the char read in into temp





if(temp != '\n' %26amp;%26amp; temp != '+'){ //filters new line char and +





if(temp == ';'){ // checks for the second number





second_num = true; //sets the value of second num to true once ; is read


// the size of the first big int will be i -1


i = 0; // resets the index


};


//reads first number


if(second_num == false){


in_data1.num_array[i] = char_to_int(temp); //stores value as integer in big_int data type


++i;


in_data1.set_array_size(i); // sets the size of the array


};





//reads in second number with filters


if(second_num == true %26amp;%26amp; temp != ';'){ //filters out ; that may be at the end of the file


in_data2.num_array[i] = char_to_int(temp); //stores the value as an integer in big_int


++i;


in_data2.set_array_size(i); // sets the value of the array size


};


};


};





//calculates result


result = in_data1 * in_data2;


//ask user for the input of the option


std::cout%26lt;%26lt; '\n' %26lt;%26lt; "To output result to screen enter 1, to output to file enter 2: ";


std:: cin %26gt;%26gt; result_option;


if(result_option == 1){


std::cout %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


result.output();


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


};





};





// outputs to file if option is 2


if(result_option == 2){


//calculates result


result = in_data1 + in_data2;


//ask the user the name of file to write to


std::cout %26lt;%26lt; "Enter the file name to write to: " %26lt;%26lt; '\n';


char outfile_name[20];


//declares the file to be written to


std::cin %26gt;%26gt;outfile_name;


std::ofstream outfile(outfile_name, std::ios::app);





// format output


outfile %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


for(int i = 0; i %26lt; result.size(); ++i){


outfile %26lt;%26lt; result.num_array[i];


if( i % 50 == 0 %26amp;%26amp; i %26gt; 0){ //starts new line every 50 char


outfile %26lt;%26lt; '\n';


};





};


// output of ; at end of file


outfile %26lt;%26lt; ';';











};








/*


if(option == 4){


std::cout %26lt;%26lt; "Input a number to calculate the factorial of: ";


int fact_in;


std::cin %26gt;%26gt; fact_in;


big_int result;


result = fact(fact_in);


std::cout %26lt;%26lt; '\n' %26lt;%26lt; "Enter 1 to output to screen, enter 2 to output to file: " ;


int result_option;


std:: cin %26gt;%26gt; result_option;


if(result_option == 1){


result.output();





};


// outputs to file if option is 2


if(result_option == 2){





//ask the user the name of file to write to


std::cout %26lt;%26lt; "Enter the file name to write to: " %26lt;%26lt; '\n';


char outfile_name[20];


//declares the file to be written to


std::cin %26gt;%26gt;outfile_name;


std::ofstream outfile(outfile_name, std::ios::app);





// format output


outfile %26lt;%26lt; "The result is: " %26lt;%26lt; '\n';


for(int i = 0; i %26lt; result.size(); ++i){


outfile %26lt;%26lt; result.num_array[i];


if( i % 50 == 0 %26amp;%26amp; i %26gt; 0){ //starts new line every 50 char


outfile %26lt;%26lt; '\n';


};





};


// output of ; at end of file


outfile %26lt;%26lt; ';';








};


};


*/





return 0;


};