Sunday, August 2, 2009

How to read an image from camera in visual C ???

i am a final year student studying IT ... and i am working on a final year project on visual C, in my project i need to read the image coming from camera, please help me to find a code or library to achieve that ... i am not advanced in this so i will be thankful for any help ... i heard about something called OCX , but i am not sure.

How to read an image from camera in visual C ???
I got one GOOD suggestion! You post this question one more time because of your impatience, Im gonna nuke your hard drive so bad you wont have to worry about it!

flower show

I know the basics of OOP in C++ now I am ready to start GUI programming, suggestions anyone?

Okay I been looking around and reading and such, and I keep getting mixed messages about the next step to take for starting gui programming in C++.. Like should I start out with learning MFC, but then again from what I hear that is just good for creating small applications. Or should I just go straight to the win32 api and start working from scratch with the windows library? From what I heard that is good for making games and complex applications. There is also this thing I heard about called WTL, which seems to also be good for making gui applications... Sooo I don't really know where to start, OH btw the type of stuff I want to make is mostly games but I would like to know how to make simple quick applications to. SOOO, any suggestions on what I should do?

I know the basics of OOP in C++ now I am ready to start GUI programming, suggestions anyone?
This really isn't a good answer to your question, but you may want to look into C# too. It's kind of a combination of C++, Java, and VB. It has a simple GUI design interface, but it still allows you a lot of control. Not quite as much as C++, but more than Java. Just an idea for you to ponder ...
Reply:Design your game such that the focal point of all your logic is the objects in the game that the user manipulates and observes.





Read up on the Model-View-Controller (MVC, for short) pattern. The basics of it are so simple, you will think it is crazy that so many people do not "get it". Just do the following.





Create a base class, called Model. Subclass it with classes that represent things that are the focus of the game.





Encapsulate any fields that hold changeable field values if they are ones that when they change - other things in the game will need to be updated, or something on the screen will need to be updated.





If you do it right, you can pretty much just write/test your game's core logical initially with a text based UI, or just by hardcoding some method calls on your model objects to test them.





The trick to it all, is that in your Model class(es), you need to have an addDependentModel and addDependentView method. Those take a Model and a View, respectively, as their arguments.





Internally, have a simple list for dependentModels and dependentViews.





When a Model object changes its state of one of the "interesting" encapsulated field values, notify first all the dependent Model objects, then all the dependent View objects.





How is this done? Have an changed() method in the base class, Model.





Make it have it call 2 other methods in this same class, called notifyModels and then notifyViews. It should pass a pointer to itself (i.e. this) whenever the update method (which should be private) is called.





It is important, vitally important, that you call notifyModels(this) before you call notifyViews(this). No view can safely display itself until all of the models have been updated.





The notifyModels method simply walks the dependentModels list - and calls the notify method of each, passing the this pointer to them.





The notifyViews method simply walks the dependentViews list and calls the notify method of each.





The definition of Model::notify(Model *m) should call the update method, which should be declared as pure virtual in the base class Model, so as to force all concrete subclasses to define what they should do. What they should do, is recompute any field values based on the objects they depend on. If you need to minimize the updates done, then look at the value of the "m" parameter, and only recalculate things that depend on that object.








The definition of View::notify(Model *m) should call the update method, which should be declared as pure virtual in the base class View, so as to force all concrete subclasses to define what they should do. What they should do, is update the display of the view. For example, redraw new image at new location, or update value in control/label. If you need to minimize the updates done, then look at the value of the "m" parameter, and only recalculate things that depend on that object.





Sometimes you get something that changes way faster than you can update the display (like perhaps a game controller whose digital readout changes frequently even when held still). In that case condition your inputs. That could mean averaging the readings and only updating 5 times per second max, or ignoring obviously spurious values. They key point, if your input changes faster than you can react and get the outputs to finish updating, you have to stop reacting to the input directly, and start taking its indications "under advisement". Learn what it is telling you in that case, but do not respond to it directly as if it was "giving the orders".





Coding things this way, your core logic - you models - do not change no matter what GUI you use - Win32, OpenGL, DirectX, Tk, or even a Java GUI Swing GUI you communicate with using JNI.





Your display logic is strictly the only point-of-contact (POC) for your whole application to display stuff on the screen.





You can create a Controller base class too. It could directly read the keyboard one keystroke at a time, for testing it could read buffered command lines from the keyboard or a file, and for a production game build it could read a controller that is managed by whatever - Win32, DirectX, you name it.





Think of your game as a Simulation - one that models reality. Its own reality, that is. The reality in a simulation, is its model - the state of all of its models in aggregation, actually.





What goes on upon the screen, is just shadows falling on a screen. They are not the focus of your application logic, they are just managed by your framework.





Everything that takes place on the screen is just a side effect of a model, notifying a view, which in turn reads the model(s) it depends upon, and makes the appropriate graphics/GUI API calls to display itself.





And that's the Tao.


I m running any c program on turboc, error message is coming that can not include header file, why?

when ever i am running any c program, the message is coming like 'undefined symbol printf' or 'function printf should have a prototype', i want should i need some thing else when i download turboc like library or something else.......my op system is widow xp and i am fed up with this getting error

I m running any c program on turboc, error message is coming that can not include header file, why?
Make sure the header files (stdio.h) are available on your computer. Are you using something like include %26lt;stdio.h%26gt; or something like include "stdio.h"?





If you are using %26lt;stdio.h%26gt; then your compiler (TurboC) should look in it's path to find the files. Check how to tell TurboC the correct directories for include files.





If you are using "stdio.h" then this is probably wrong. With the quotes usually means include in the same directory as the source files. Try changing to %26lt;stdio.h%26gt; instead.





Let me know if I can be of any more help.


TAKE IT AS A CHALLENGE FROM ME...............C++ QUESTION???? RELATED TO MACRO #define.............?

Can you write a program in C/C++ which takes an integer number as an input and returns the same number as a string using macro expansion. (#define macro.) Note you can not use any library function and other method. Don't try if U do not use #define macro only.





If U can I Guarantee to U will win 10 points.


Thanks!

TAKE IT AS A CHALLENGE FROM ME...............C++ QUESTION???? RELATED TO MACRO #define.............?
#define a readln();





main(){printf("%i",a);}


Wher can i find a C.D which can take my stats and give me money for free In the online runescape game?

IS there a library in west l.a with a zip code of 90024-90025 that i can buy this c.d from?

Wher can i find a C.D which can take my stats and give me money for free In the online runescape game?
Theres no such thing.
Reply:If you find a CD and use it - you'll be kicked out of the game. It's in their rules of the game #7 - macroing.





Just so you know - others can also report you for trying. And anyone who answers this post with that info, can also be reported.

phone cards

Can any one help me hw do a simple project on c++ based onarrays,function,randomize etc based on topic quiz?

actually can some 1 send a simple project based on quiz in c++ language and i shpuld me mostly based on usage of arrays,strings,standard library functions and concept of functions%26gt;???

Can any one help me hw do a simple project on c++ based onarrays,function,randomize etc based on topic quiz?
i can .. mail to ranjith_1shetty@yahoo.co.in


i ll send u a graphics editor project done in c++ running on linux..


How to write a calendar in C which is same as cal function in unix?

How to write a calendar program in C which is same as cal function in unix, the exact website is good, which just using standard library

How to write a calendar in C which is same as cal function in unix?
That is open source code already written in C.


Do you know what change Obama is going for in Washington, D. C.? Do you want to know?

This is what Obama would change from happening with our tax dollars. The frivolous spending in Washington, D.C. is incredible and not right at all; check out this story and tell me what you think:





"Charlie Rangel, a New York Democrat, obtained $2 million earmark to establish a public service center that is named after him that supposedly would prepare individuals for careers in public service. A college spokesman said the center would include an office for Rangel and a library for his papers and memorabilia.





I mean who the heck authorized our tax dollars to go for a library for individual congressmen?





Representative John Campbell (R-CA), said Rangel should be ashamed of using tax dollars to build a monument to himself.





But Rangel, who took office in 1971, brushed aside the criticism, and told John he would have a problem if he did it, because John Campbell had not been around long enough to inspire a building like what he was getting the earmark for."

Do you know what change Obama is going for in Washington, D. C.? Do you want to know?
Can we change that? Yes we can! Obama today in Ohio, in Texas, in Vermont, in Rhode Island. Obama in April in Pennsylvania. And if it is like that, can we change America? Yes, we can.
Reply:Anyone who wants to know fuller details of the Obama platform, you can read it at his website:





http://www.BarackObama.com/
Reply:Yeah we need to end the "buddy system" that is in place. To think, that could have went to paying down the national debt! Or some real help in New Orleans.
Reply:Obama will not change that. Charlie Rangel I'm sure is a friend of Obamas. Obama is one of those earmarking Senators. He has been named on the top ten of Ten Most Wanted Corrupt Politicians” for 2007.





John McCain is the only one running not on that list and he is the only Senator running that did not write any earmarks.





Don't be fooled by speech. Judicial Watch does not endorse any candidates.


UPDATE:


I love the thumbs down when someone actually does have a source of information.


you guys are FOOLS. He is as corrupt as the rest.
Reply:No I don't
Reply:I believe Obama will bring a multitude of positive changes to this country. Especially special interest and frivolous spending of taxpayer dollars.
Reply:Not much. Politic as usual.
Reply:Higher taxes, more government interference in your business, more welfare. Socialism.


What software and code is used to make professional games? Is it really C++?

I browsed on Y! answers for similar topics, and I heard a lot of people say that video games were made with C++. What the hell? How does this work? It takes forever to create even the simplest game with C++; ActionScript or Game Maker Language would take far less time. And what kind of program creates games? Surely they don't use Visual C++ or something like that! Is the software setup similar to Game Maker, where there is a library of graphics, sounds, code, objects, and rooms?

What software and code is used to make professional games? Is it really C++?
Simple games "take forever" because it's likely only you sitting at your screen cranking out code. Any significant project requires several man-hours of requirements analysis and architecture planning, and then you have to code it, and even worse, debug it. If you're talking about a "cool" game, this could take one person alone years. Many professional games are made with C++, but they are made by organizations of hundreds of (professional) people using engineering practices to minimize the amount of effort needed to create something so complex.
Reply:just a comment : my dad knows how to use the C++ thingie but he said that i am too young to learn how to use it. he only teaches me how to use the visual basic thingie. he showed me a super-simple game he made on C++ once and it took him 1 hour to make it so if u are new to things like that, u should start with something easier. EVEN my dad doesn't know much about C++. (my dad sells a program made on C++ in a program-selling site. he set the program's price to 30$ and only 1 person bought it ~_~ (the program is about astrology stuff))(but 1 more thing : U CAN MAKE A VIRTUAL PET GAME ON VISUAL BASIC ^_^ (just ask your parents to help u if u really want to make it. if your parent don't know ANYTHING about that, just yahoo/google search for some codes/info))
Reply:It's all about performance. The languages you are referring to are interpreted script languages. This means they run inherently slower than applications compiled to machine code by C++. Faster code means faster rendering times, better AI, more features, etc.





Also, script languages like ActionScript or tools like Game Maker have not been around for long relative to how long games have been around. Since C and C++ were known to have excellent performance and both were a (relatively) high-level language (making them both much easier to learn than assembly), early games were predominantly written in C and later C++.





Plenty of games have been written using tools such as Visual Basic, BlitzBasic, Game Maker, ActionScript, DarkBasic, Delphi, or one of dozens of other languages. However, none have been as entrenched as C or C++ mostly due to the history of the game industry.
Reply:Yes it's all C++, mostly it's based based on the random generator functions and you need C++ to do that.





Sorry I know it's a pain but that's just the way it works.
Reply:Yes, it's really C++. More specifically, they write their game engines in C++, and those usually include a macro or scripting language that allows them to manipulate game-level objects.





And yes, they do have libraries of graphics, rooms, sounds, etc. They make those, too. 3D models are, for example, build with a 3D design application and are then converted to the game engine's native format with a conversion tool (that the game development company usually writes), which often also performs animation transformations, etc.





When all is said and done, the elements are combined, the game engine starts, reads it's macro scripts and loads all object and game data, and off it goes.





You also forget that ActionScript and Game Maker are just scripting layers set on top of compiled engines, usually written in C++. Almost all desktop software in the Windows is written in either C, C++, or Visual Basic. C/C++ is preferred for things like video games because it is a good balance between hardware abstraction and performance.





And yes, it does take a long time to create game engines. That's why most small development companies usually start by licensing someone else's game engine and building their game with it. For example, the open-source Quake engine. Developing a new game engine can be a multi-million dollar undertaking.

orange

Can you type in another language in a C++ program?

I'm writing a C++ program that involves translating certain things to other languages. The program itself works fine, except that when it comes to languages that don't involve the same letters as English does, I have to type in the pronunciation.





Hopefully this example will show up:





The number 1 in Hebrew is אחד





But when I type that into the C++ editor, it comes out as:


ẦầẨẩẫẬậắỎỏỞ





Or when I write it into Microsoft Word and copy-and-paste it, it comes out as only ?'s.





I end up having to write "1 in Hebrew is pronounced Echad".





Is there any way to type in another language? Can I #include a language library or something? Or is it a lost cause?

Can you type in another language in a C++ program?
The character encoding is probably wrong. For Hebrew, either ISO-8859-8 or Windows-1255 are what's typically used.





To get the text to display properly in Microsoft Word, try using the font "Arial Unicode MS". Information on the font is available at http://en.wikipedia.org/wiki/Arial_Unico... .





The proper steps for viewing the font properly in your C++ editor depends on what editor you are using -- what editor are you using, anyway? -- but generally it involves going into the tools or view menu and selecting the proper character encoding.





And, um, you're going to want to have a look at this excellent article: http://www.joelonsoftware.com/articles/U...





UPDATE:


When I copied the characters into Microsoft Word, they came out fine (i.e., as they are supposed to). What version of Microsoft Word do you have installed?
Reply:The font determines how it comes out as well. Different fonts have different "special" character codes.
Reply:I guess, what you can use is just put in the unicode number for the character for example, the character A in katakana is 30A2, and use printf instead of cout to display the character. If the destination computer supports this, hopefully, it will come out correct. Otherwise, I spose, it IS problematic...


How do you do this in C++?

i really want to make a simple 2d game in c++ but i don't know how to actually write the code witch would make a character move around the screen. how can i do this. i watched a video on youtube with a guy that was typing code with the allegro library, and he made a charactor in paint and at the end he made this guy moving around the screen how do i do this in C++...im using devc++ i dont know if that can do it or not.





thanx!

How do you do this in C++?
To write a game like this you should understand the Model-View-Controller pattern and know a good bit about a graphical library package that you think will suite you. C++ might right to write this game in but there are other technologies that could ease you in a bit smoother (Java and Flash might be something to consider).
Reply:You can find some good tutorials in OpenGL (graphics library) from NeHe. nehe.gamedev.net. This is a good reference site if you are just starting out in C++ and it will give you the fundamentals of the graphics libaries, even 3d development. Basically create a picture, create a square and map the picture to it. Good luck ;)


Data validation in C?

help me with the code for data validation in C


i need for both integer type n character type data


i tried using the isalpha() n other functions from the ctype.h library


but i m not gettin the logica correctly


please help me out with this


thanks

Data validation in C?
The parameter should be inside the brackets ie





ch="A"


st="Lots of characters"


in=1234





boolean_result=ischar(ch)


boolean_result=isstring(st)


boolean_result=isnumeric(in)
Reply:use isdigit function instead of isalpha function for validation of two integers.
Reply:Not really clear what you are asking, but have you tried isdigit() ? Or isalnum() ?


How to write a program in C by turning a hexadecimal to a decimal?

im having a hard time with this right now. help





write a c program that utilizes strings and numeric conversions





1. Read strings using a function you write called getStr ().


2. Write a function named hextodecimal () that takes in (only) a string parameter representing a positive hexadecimal number and return its decimal equivalent (integer). This function returns -1 if the string provided connotes to a negative number and/or is comprised of invalid characters.


-note: you may not use any library functions in this function- you must write all code necessary to enact the coversion and return the appropriate result.


-this function must accept both upper and lower case versions of the hex character.


-You may want to write an additional function that vets any string for invalid hex character


3. If original string is invalid, output an unambiguous message to the user and prompt for another input.


4. Output the original String, followed by its decimal equivalent. Clearly label which is which

How to write a program in C by turning a hexadecimal to a decimal?
I don't want to give you the entire solution, but I will give you some pieces to help, and comments where you need to fill in the code. This assignment justifiably restricts you from using library functions, which you would normally use to do much of the work for you. Use of fgets to get the user input is, I assume, allowed.





Note that I put the validity check in getStr, but part 2 of the problem statement wants you to check validity in hextodecimal, which is probably a better place to put it.





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


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





typedef enum { false = 0, true } Bool;





double Pow(const double x, const unsigned y);


int AtoI(const char c);


Bool isValidHexChar(const char c);


Bool getStr(char *s);


int hexToDec(char *s);





#define MAX_STR 256





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


char s[MAX_STR];





memset(s,0,sizeof(s));


if (getStr(s) == false) {


puts("\ninvalid entry");


} else {


printf("\n%s = %d\n",s,hexToDec(s));


}


return 0;


}





Bool getStr(char *s) {


char *p = s;


Bool isValidFlg = true;





/* prompt for hex value and read it using fgets */


/* remove '\n' from end of entered string */


/* loop for each character in the string, */


/* calling isValidHexChar( ) to check validity */





return isValidFlg;


}





int hexToDec(char *s) {





/* loop from the last char in s to the first, */


/* calling AtoI and Pow as you go to convert */


/* from hex to decimal */





return result;


}





double Pow(const double x, const unsigned y) {


double result = 1;


int i;





if (y %26gt; 0) {


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


result *= x;


}


}


return result;


}





int AtoI(const char c) {


int i = -1;


if (isValidHexChar(c) == true) {


if ((c %26gt;= '0') %26amp;%26amp; (c %26lt;= '9')) i = (int)c - 0x30;


else if ((c %26gt;= 'a') %26amp;%26amp; (c %26lt;= 'f')) i = (int)c - 0x57;


else i = (int)c - 0x37;


}


return i;


}





Bool isValidHexChar(const char c) {


Bool validFlg = false;


if (((c %26gt;= '0') %26amp;%26amp; (c %26lt;= '9')) ||


((c %26gt;= 'a') %26amp;%26amp; (c %26lt;= 'f')) ||


((c %26gt;= 'A') %26amp;%26amp; (c %26lt;= 'F'))) {


validFlg = true;


}


return validFlg;


}
Reply:try to avoid hexadecimal value....

flash cards

How to write a program in C by turning a hexadecimal to a decimal?

write a c program that utilizes strings and numeric conversions





1. Read strings using a function you write called getStr ().


2. Write a function named hextodecimal () that takes in (only) a string parameter representing a positive hexadecimal number and return its decimal equivalent (integer). This function returns -1 if the string provided connotes to a negative number and/or is comprised of invalid characters.


-note: you may not use any library functions in this function- you must write all code necessary to enact the coversion and return the appropriate result.


-this function must accept both upper and lower case versions of the hex character.


-You may want to write an additional function that vets any string for invalid hex character


3. If original string is invalid, output an unambiguous message to the user and prompt for another input.


4. Output the original String, followed by its decimal equivalent. Clearly label which





with ASCII of ‘0’=48; value of ‘A’=65

How to write a program in C by turning a hexadecimal to a decimal?
suggest you post a code sample of what you have done already. this way people can help you and not GIVE you the answer.


Pls,can someone send me a C++ project of around 400lines whichcan run on linux (fedora 3)O.S.i need in 2 days?

I need this project and i have to give my presentation.


this C++ project ,which should run on linux O.S(fedora 3), can be on any topic like library management,hotel management,ticket confirmation for plane etc.this project should be around 400 or 500lines.if someone sends me within 2days ,i shall be very grateful to him/her.pls send me the code and withthis whatever neccessary.

Pls,can someone send me a C++ project of around 400lines whichcan run on linux (fedora 3)O.S.i need in 2 days?
there aint a person on the planet that is going to do all that for you - by all means ask questions, but expecting people to code entire projects for you is just ridiculous.
Reply:You are amazing. Why are you in school? Certainly NOT to learn anything.

flower girl

In C language how to hide part of my code. I tried library file but it still shows the souce.?

I assume by hiding you mean the functionality of dll and ocx - components and objects as in VB.





In C, this is not possible. As you said, if you even use header files, the header file would still contain the source.





But when you develop a complete project in C, normally you do not distribute the source code files. You just would use some custom tool to distribute the compiled obj and exe files.





These compiled files and executables obviously would not be showing your code.





If however, you need to give the source code to your client and still want to hide some portion of your code in it, I am afraid that is not possible in C.





Regards,


C.S. Chandrasekkar

In C language how to hide part of my code. I tried library file but it still shows the souce.?
What?





You mean a comment?





//this


or


/* this */





I don't know what you're talking about when you say "Hide" your code.... when you compile it, you can't get that code back. (well back in C anyway)
Reply:It sounds like you are just including a source file instead of a library. What you really need to do is compile the library functions into a binary library, without symbol tables of debugging info, and include a header file that defines any constants or data structures needed to use the library. This varies from one compiler to another and also by OS.


Can any one give me asite that can I down load source c++ code about sun eclipse using open gl???

This summary is not available. Please click here to view the post.

In C++, how to compile your code to link in a certain library statically?

pls post code if ever thanks!

In C++, how to compile your code to link in a certain library statically?
Include the header file(s) for the library:





%26lt;include whatever.h%26gt;





Then to link in the library, look in your project options or settings for linker settings. There should be a place to type in the name of the library. There's often another place nearby to specify what directories to search for the libraries. For example, in MS Visual C++ 6.0, go to Project/Settings, click on the Link tab, and add the library to the ones listed in "Object/library modules". Choose "Input" from the "Category" drop-down list, and and put the library's directory in "Additional library path".
Reply:If you are using gcc, just add "-static" option to your compile command line.





For example,


gcc -static -g -Wall -o myprog myprog.c ...


Writing Skills?

1. You've settled on an idea for an essay to write. What should you do next?





A. Plunge right in and start writing. Then create your outline from what you've written.


B. Ask the reference librarian to help you make a plan and prepare your outline.





C. Look up your topic in the Readers' Guide and use an article you find as a basis for your plan and outline.





D. Conduct interviews, do some research, ask questions, and make a plan.














2. Where should you look to find quick information on the causes of the American Civil War?





A. Dictionary


B. Readers' Guide





C. Encyclopedia





D. Concise Dictionary of American Biography














3. You've come across a book in the card catalog that you think will be useful in your research of famous labor leaders. What three things should you copy from the card so that you know how to find the book?





A. The call number, the title, and the topic


B. The call number, the title, and the author's name





C. The call number, the author's name, and the date of publication





D. The call number, the topic, and the date of publication of a book














4. Where would you look to find an article on recent fashion trends?





A. Readers' Guide


B. Who's Who





C. Card catalog





D. Encyclopedia














5. Once you acquire these two basic skills, you'll be able to transform a vague idea in your mind into a coherent piece of writing.





A. Doing interviews and browsing through books


B. Describing people and writing conversation





C. Using the Internet and the on-line catalog





D. Doing research and organizing your ideas














6. A CD-ROM is a compact disk that





A. contains stored information that can be read on a computer.


B. generates random essay topics.





C. allows you to borrow books from any library.





D. regulates the Library of Congress.














7. Which of the following skills is most important in learning how to write?





A. Knowing proper punctuation before you write


B. Knowing proper grammar before you write





C. Knowing how to plan before you write





D. Knowing how to use the Readers' Guide before you write














8. A search engine is a way to





A. find information on the Internet.


B. revise a rough draft.





C. borrow reference books in the library.





D. speak with a reference librarian.














9. A disadvantage of using a sentence outline instead of a topic outline is that a sentence outline is often





A. rigid.


B. time-consuming.





C. underdeveloped.





D. factually grounded.














10. The on-line catalog is a computerized index of





A. books in a library.


B. library telephone numbers.





C. library patrons.





D. reference librarians.














11. What is one problem you should keep in mind when researching information on the Internet?





A. Information is seldom available on the Internet.


B. Library staff usually keep Internet computers locked.





C. Information found on the Internet may be unreliable.





D. You should avoid using search engines when you're searching for information on the Internet.














12. The Dewey decimal system is the classification system used by





A. scientific articles in magazines.


B. the Internet.





C. most research and university libraries.





D. most public libraries in the United States.














13. Reference librarians are specially trained to help you





A. get a library card.


B. research a topic.





C. sign out videotapes.





D. create an outline.














14. University libraries are _______ to the public.





A. closed


B. open





C. hostile





D. inaccessible














15. The World Almanac is a book of





A. articles published in magazines.


B. facts and statistics.





C. synonyms.





D. living notable Americans.














16. Parallel construction means that you





A. begin each paragraph of your essay in the same way.


B. repeat the first paragraph of your essay as the last paragraph.





C. give both sides of the argument in your essay.





D. use the same grammatical construction in all similar headings throughout an outline.














17. What is the most reliable way to get the opinions of experts on any writing topic?





A. Do research at a library.


B. Call them to set up interviews.





C. Write to them and hope for an answer.





D. Contact them on the Internet.














18. You need to write an essay about hot air ballooning. You know you've seen a good book on this topic, but you can't remember the name of the book or the name of the author. How could you most easily find this book in the library?





A. Locate the title card for the book in the card catalog.


B. Locate the author card for the book in the card catalog.





C. Look under "balloons" in the Readers' Guide.





D. Locate the subject card for the book in the card catalog.














19. The position from which you write about your subject is called your





A. point of view.


B. outline of ideas.





C. plan.





D. advantage.














20. What do we call an idea that will make the reader take notice and want to read on?





A. Card


B. Point of view





C. Hook





D. Summary

Writing Skills?
1-c


2-b


3-b


4-b


5-b


6-a


7-b


8-a


9-a


10-d


11-c


12-c


13-d


14-d


15-c


16-a


17-a


18-d


19-c


20-d





you asked some good questions, i wonder if this is for homework? lol
Reply:I'm taking the same test, and you've got a few wrong ones here =) Report It

Reply:In fact quite a few here bud.....alot of incorrect answers given by both people here, so be very careful. Report It

Reply:1. You've settled on an idea for an essay to write. What should you do next?C. Look up your topic in the Readers' Guide and use an article you find as a basis for your plan and outline.








2. Where should you look to find quick information on the causes of the American Civil War?B. Readers' Guide





3. You've come across a book in the card catalog that you think will be useful in your research of famous labor leaders. What three things should you copy from the card so that you know how to find the book?B. The call number, the title, and the author's name





4. Where would you look to find an article on recent fashion trends?B. Who's Who





5. Once you acquire these two basic skills, you'll be able to transform a vague idea in your mind into a coherent piece of writing.B. Describing people and writing conversation





6. A CD-ROM is a compact disk that A. contains stored information that can be read on a computer








7. Which of the following skills is most important in learning how to write?B. Knowing proper grammar before you write





8. A search engine is a way to A. find information on the Internet








9. A disadvantage of using a sentence outline instead of a topic outline is that a sentence outline is often A. rigid.





10. The on-line catalog is a computerized index of D. reference librarians.





11. What is one problem you should keep in mind when researching information on the Internet?C. Information found on the Internet may be unreliable





12. The Dewey decimal system is the classification system used by C. most research and university libraries.





13. Reference librarians are specially trained to help you D. create an outline.





14. University libraries are _______ to the public D. inaccessible





15. The World Almanac is a book of C. synonyms.





16. Parallel construction means that you A. begin each paragraph of your essay in the same way..





17. What is the most reliable way to get the opinions of experts on any writing topic? A. Do research at a library.





18. You need to write an essay about hot air ballooning. You know you've seen a good book on this topic, but you can't remember the name of the book or the name of the author. How could you most easily find this book in the library? D. Locate the subject card for the book in the card catalog





19. The position from which you write about your subject is called your C. plan.








20. What do we call an idea that will make the reader take notice and want to read on?


D. Summary

curse of the golden flower

Windows Media Player XP can't locate C.D.?

After burning and rip'g C.Ds several weeks,the p.c.suddenly can't find the C.D. in the player.


I've pressed F5 key but without any luck,I also have no sound through the library.PLEASE can any one help?

Windows Media Player XP can't locate C.D.?
Theres alot of possibilities:





1. When you burn:


- They were only shortcuts


- U didnt verify the CD





2. Your CD player isn't functioning properly, you need to clean it using a CD Cleaner
Reply:I WISH I NEW BUT I DON'T GIRL... TRY ASKING UR FRINEDS MAYBE THEY'LL HELP U OUT


PLease provide a short explanation with each answer of my C++ program....?

Assuming Point is a class type with a public copy constructor, iden¬tify each use of the copy constructor in this program fragment:


Point global;


Point foo_bar(Point arg)


{


Point local = arg;


Point *heap = new Point(global);


*heap = local;


Point pa[ 4 ] = { local, *heap };


return *heap;





______________________________...





Exercise 13.10: Define an Employee class that contains the employee's name and a unique employee identifier. Give the class a default constructor and a constructor that takes a string representing the employee's name. If the class needs a copy construc¬tor or assignment operator, implement those functions as well.





______________________________...








Among the fundamental operations a pointer supports are dereference and arrow. We can give our class these operations as follows:


class ScreenPtr { public:


// constructor and copy control members as before


Screen %26amp;operator*() { return *ptr-%26gt;sp; }


Screen *operator-%26gt;() { return ptr-%26gt;sp; }


const Screen %26amp;operator*() const { return *ptr-%26gt;sp; } const Screen *operator-%26gt;() const { return ptr-%26gt;sp; } private:


ScrPtr *ptr; // points to use-counted ScrPtrclass








Exercise 14.20: In our sketch for the ScreenPtr class, we declared but did not define the assignment operator. Implement the ScreenPtr assignment operator.





______________________________...





Exercise 14.21: Define a class that holds a pointer to a ScreenPtr. Define the over¬loaded arrow operator for that class.


______________________________...








Exercise 15.4: A library has different kinds of materials that it lends out—books, CDs, DVDs, and so forth. Each of the different kinds of lending material has different check-in, check-out, and overdue rules. The following class defines a base class that we might use for this application. Identify which functions are likely to be defined as virtual and which, if any, are likely to be common among all lending materials. (Note: we assume that LibMember is a class representing a customer of the library, and Date is a class representing a calendar day of a particular year.)


class Library { public:


bool check_out(const LibMemberk);


bool check_in (const LibMember%26amp;);


bool is_late(const Date%26amp; today);


double apply_fine();


ostream%26amp; print(ostream%26amp; = cout);


Date due_date() const;


Date date_borrowed() const;


string title 0 const;


const LibMember%26amp; member() const;





______________________________...








Exercise 15.8: Given the following classes, explain each print function:


struct base {


string name () { return basenatne; }


virtual void print(ostream %26amp;os) { os « basename; } private:


string basename;


};


struct derived {


void printO { print (ostream %26amp;os) ; os « " " « mem; } private:


int mem;


};





If there is a problem in this code, how would you fix it?





______________________________...








Exercise 15.13: Given the following classes, list all the ways a member function in Cl might access the static members of ConcreteBase. List all the ways an object of type C2 might access those members.


struct ConcreteBase {


static std::size_t object_count(); protected:


static std::size_t obj_count;


};


struct Cl : public ConcreteBase


{ /* . . .*/};


struct C2 : public ConcreteBase


{ /* ...*/};





______________________________...





Exercise 15.25: Assume Derived inherits from Base and that Base defines each of the following functions as virtual. Assuming Derived intends to define its own ver¬sion of the virtual, determine which declarations in Derived are in error and specify what's wrong.


(a)Base* Base::copy(Base*);


Base* Derived::copy(Derived*);


(b)Base* Base::copy(Base*) ;


Derived* Derived::copy(Base*) ;


(c)ostreamk Base::print(int, ostream%26amp;=cout);


ostream%26amp; Derived::print(int, ostream%26amp;);


(d)void Base::eval() const;


void Derived::eval();

PLease provide a short explanation with each answer of my C++ program....?
And what makes you think that people here have enough free time to do your homework, when all you could do was to copy and paste it here?


How do I enter an EOF character using keyboard in Turbo C.?

I have the following code:


--------------------------------------...


FILE *f1;


char c;


f1 = fopen("INPUT","w");


while((c=getchar()) != EOF)


putc(c,f1);


fclose(f1);


--------------------------------------...





FYI - This is not the full program. The only statements before this is the library function(stdio.h) and main.





When the program hits the loop, i am able to enter characters, but I am not able to terminate the loop.





I searched the web and found that the value of EOF is -1 or above 255. But if I enter -1, the putc statement is writing '-' to the file, then '1' to the file as 2 separate values.





I searched further and found I could terminate the loop by entering ctrl+z, ctrl+d, or ctrl+c. The first 2 did not work and ctrl+c terminated the execution of my entire program.





Does anyone know how to solve problem?

How do I enter an EOF character using keyboard in Turbo C.?
Try f6+enter





It works for copy con command in command line.
Reply:Alt+C is working in this mattar.
Reply:well it depends on the level of your quantin compacity accelator is it high or is it low plz write back when you find out
Reply:If you open the file on a TEXT stream the End of File character is CTRL Z





If its on a binary stream the End of File is CHR(0) that is NULL character.


Urgent c++ code please help me ?

the question is wiritng a c++ code for printing all prime numbers between any 2 numbers( those two numbers are included.example:


input :


103


110


output :


103, 107 )


. please not use cout, cin and getch() our library does not include those codes :D thnx for helping ...

Urgent c++ code please help me ?
This function might be helpful:





bool isPrime ( int p ){ // p is the candidate


bool result = true; // we assume that p is prime


if ( i %26lt; 2 ){


result = false; // if p is less than 2, it's not prime


}


else{


for(int i = 2; i %26lt; p; ++p){


if (p%i==0){ // if p is evenly divisible by anything.


result = false; // it's not prime


break;


}


}


return result;


}





In your main program, loop from the first number to the second. Use the function to determine whether or not the value is prime. HTH...

apricot

Windows Media Player XP can't locate C.D.?

After burning and rip'g C.Ds several weeks,the p.c.suddenly can't find the C.D. in the player.


I've pressed F5 key but without any luck,I also have no sound through the library.PLEASE can any one help?

Windows Media Player XP can't locate C.D.?
try uninstalling and then reinstalling the Windows Media Player or getting the update from the microsoft website. If that does not work try this...





1. Right click on my computer. Go to properties and click.


2. A system properties window will open up. Click on the "hardware" tab.


3. Click on the "device manager" button.


4. You should now see all the devices on your computer.


5. Click on the + sign next to cd rom and when the type shows up, right click on your device. Make sure there is not a yellow yield sign. If there is, you have a different issue.


6. Click on "update driver"


7. Restart your computer.


Quick C# question?

Im using C#. How do i obtain at runtime my class information? ie. MyApp.TestClass, TestConsoleApp0, Version=1.0.2571.41421, Culture=neutral, PublicKeyToken=null.





Im using AjaxPro.Net JSON library and on serializing it reports such information. I like to know how they obtained this info of my class object.

Quick C# question?
You need to look at the System.Reflection namespace. It has a number of classes for loading assemblies and listing (and calling) their properties and methods.


A project in C++ for class XII computer science.Help me choose a title?

The guidelines


The project should ensure the coverage of following areas


of curriculum:


a. Problem Solving


b. Data Structure


c. Object Oriented Programming in C++


d. Data File Handling


Theme of the project can be


• Any subsystem of a System Software or Tool


• Any Scientific or a fairly complex algorithmic situation.


• Business oriented problems like Banking, Library information


system, Hotel or Hospital management system, Transport query


system


• Quizzes/Games;


• Tutor/Computer Aided Learning Systems


2.3 The aim of the project is to highlight the abilities of algorithmic


formulation, modular programming, optimized code preparation,


systematic documentation and other associated aspects of Software


Development.


2.4 The assessment would be through the project demonstration and the


Project Report, which should portray Programming Style, Structured


Design, Minimum Coupling, High Cohesion, Good documentation of the


code to ensure readability and ease of maintenance.

A project in C++ for class XII computer science.Help me choose a title?
My advice wud be to go for a Hotel Management System or Banking System or even better ..go for a Library System.





The one and only site I wud advice u 2 visit is this:


http://www.daniweb.com/





You can get loads of information as well as codes from this forum...


Hope this will help in some way! :-)
Reply:client server application like chat programs
Reply:That is too much of work, you may contact a C++ expert at http://askexpert.info/ to code your project assignment.
Reply:Choose Banking or Library Management
Reply:Check out http://www.dotnetspider.com/projects/
Reply:Pluses of C++ . . .


wht d ya thnk ?
Reply:Everything With C++


How can i learn c programming language fast ?

i'll try to learn c programming language at home. as i have computer ,internet at home as well as library facility next door. is there part time course available in edinburgh,scotland?

How can i learn c programming language fast ?
If you want to create any kind of software, you first have to learn programming in general.





Your first step should be to get a good book that teaches you the fundamentals. A good book to start is:





http://www.ibiblio.org/obp/thinkCS/





(I strongly recommend the python version here)





This book is so well because it does not waste time teaching you a specific language or libraries but concentrates you on how to program.





Then you need to learn object oriented programming. A good book that does this is this book about Java:





"Thinking in Java"


http://mindview.net/Books/TIJ4





and you need to know about low level programming. Here, I recommend this book:





"The C Programming Language"


http://www.amazon.com/exec/obidos/tg/det...





And then, to become a really good hacker, you will have to read this one:





"Structure and Interpretation of Computer Programs"


http://www.amazon.com/Structure-Interpre...





there is a free online version here:





http://mitpress.mit.edu/sicp/





IMPORTANT: Beside all the reading, you have to constanly read other programs and write your own code. These three things are pretty much equally important to make fast progress: reading books, writing code and understanding other peoples code.





As an somewhat alternative route, Peter Norvig, one of the greatest thinkers of our time, has set up a document a while ago that teaches a good way to become a good programmer:





"How to become a programmer in 10 years"


http://www.norvig.com/21-days.html





I'm not sure if this is a fast way to become a good C programmer, but it is the fastest way I can think of.
Reply:For the syntax and some concept you need no more than a couple of hours... Search on the net for some C tutorials.. If you also want to be good at it... it will take several years of practice, so start writting some code asap :D...
Reply:My advice: I am a software engineer designing video games at this point; The coding language "C" is rather old and rarely used much any more. You should look into OOP, object-oriented programming. The language to study is C++ (C plus plus) then C# (C sharp). Follow this link and closely read all the contents for C++. It is very good. After you read this and try to understand it, search Google for more C++ info.


http://www.oopweb.com/CPP/Documents/Thin...
Reply:http://cm.bell-labs.com/cm/cs/cbook/ is probably the best textbook on C. do not listen to people who say that C is bad and OO is the answer. any programming language is simply a tool. you always need to match the right tool for a given job.
Reply:lmao....


you can't.
Reply:Search the internet for C Programming for Beginners. I included a link below, but you can find lots more on your own.
Reply:Learn original C? Just google in "c tutorial"
Reply:better u start urself first from the most basic books written specially for "C",it's Let us C by yashwant Kanikar,and Ansi C by Balagruswamy,Both are Asian books and you can get these books easily,moreover you can get Denis Ritchie's book online for C,he is father of c,moreover the puzzle books for c can help u to get practical knowledge of c,in one of ur answers to ur Q?,some said it is an obsolete language,but to the knowledge of my extent it is the best and open so u must go for it and learn it the best possible
Reply:no
Reply:I suggest you to check out the following links:





http://www.c4swimmers.net


http://www.c4swimmers.esmartguy.com


http://directory.google.com/Top/Computer...





and more....

song words

Are Christians stealing books on the occult from libraries?

http://www.sfgate.com/cgi-bin/article.cg...





Librarians in small town Oklahoma seem to think so.





"Books about witchcraft may disappear because self-styled censors are stealing them to keep them out of others' hands. "We are a tiny library in eastern Oklahoma and our most often stolen materials pertain to witchcraft. It is my belief that these books are taken by those who want to censor the materials, not by those who want to study them," wrote a public librarian from Wister, Okla."

Are Christians stealing books on the occult from libraries?
i'm sure they are not stealing them, that would be against the 10 commandments.


maybe culling or cleansing.
Reply:I really believe your thieves are the little witches.
Reply:its good to know that people studying witchcraft would never steal a book.
Reply:Oh man my school library has books on the occult, and I've been checking them out and reading them.





If I found out some ******* theist was destroying them, I would kick their god damed ***!
Reply:I happen to have been in a library in my home town when I saw this family of 4 ( a husband, a wife, two children one a boy the other a girl) Well, the parent's where looking out and the children where writing in the books and ripping out pages of not only occult books but books from other religions such as islam, hindu and buddhists. Before I could find someone to report them they where gone. I felt so sad for those people and their ignorance.





With everyone saying it could be the person interested in keeping a book longer. Most libraries offer patrons extentions on materials, now the story does leave out the condition the books are returned back in. I also wonder how they are able too in the first place most libraries have anti theft systems in place.
Reply:Prove it's us.
Reply:That certainly wouldn't surprise me because when I lived in the mid-west in the late '80's and early '90's there were places out there that still held book burnings.
Reply:It would be a sad commentary on our society if this were proven to be true.....
Reply:That's sad if it is true. But, who knows, maybe it is just the work of those ubiquitous Satanic cults I hear so much about.


Or just angsty kleptomaniac teens...





Ironically enough, those possibilities are a lot less troublesome than this...
Reply:I don't think it is a fair assumption.


It could be Goths making a giant wall collage.


It could be Gamers postering their rooms, like decoupage.


Here in small town Ontario the librarian knows everything about everyone. Believe me, we know everything about her as well.
Reply:Someone is so my odds would be divided between kids wanting to learn more on the occult or Christians. I know locally, it was found to be Christians trying to censor. Occult and "anti" Christians books disappeared regularly and some who were caught were self professed Christians.
Reply:Yup. Books on occult are the highest disappearing book in libraries all over the US. I live in a little town, and the library has those sensor things at the door, like the ones at Wal-Mart. Sometimes it's the Christians,. sometimes it's pagans afraid of going into an occult shop. I don't have a problem, I go to Half-Price Books. I think half of the people at the one I frequent are pagans.
Reply:I worked in a small town library in SD for over 4 years. The few books on witchcraft that they ever had were stolen, and they only had SRW books to begin with. Also any books that had anything to do with homosexuality were also stolen. The librarians thought it was people trying to censor this stuff, not to steal it just to keep it.
Reply:My library doesn't have any books on witchcraft or the occult.





I can't find a solid tome about demonology anywhere.
Reply:It's not beyond them. I had a friend working at a book sale for kids, and she said another volunteer deliberately left "The Golden Compass" in the boxes. My friend asked about it, and the lady said "They won't buy it if they don't know we have it."





So yeah they will stoop to low practices to keep people from having unapproved thoughts.
Reply:It sounds possible. It is even bizarre enough to be probable.








I like the fact that they did make this point in the article:


Another reason that books about the occult, car repair, tests or sex disappear might be that people are really studying them. "What do these subjects have in common? They all require extensive practice at home, and it takes longer than the four-week checkout period to get good at it," wrote the Benicia librarian.





Nice article. thanks.
Reply:Wow, that's freaky. You know, I went down to our library and offered them abou 50 books out of my personal Occult Library, and they refused them, saying they'd put them up for sale, but not on the bookshelves. Well, if you've been to my library, you'd know there are very few Occult books in the library. (Do a search in the Carnegie Library of Pittsburgh, and see for yourself)
Reply:That is the opinion of a public librarian in Wister OK...hardly a fact..





Her opinion is wrong...





I live in an area that seems to have a high influence of occultists, wiccans, witches, dark magicians, satanism...it is a big problem.





We are routinely warned about our pets on certain days....keep them in...





The tagging is terrible..





Stores are broken into and things stolen often has an occult connection.





Our Libraries do not let these kind of books out...you want to look at them..fine..but do it there..





Believe me..Christians are not looking at these books..it would be a huge sin..





It is a well known and accepted presumption in our area that these materials will be stolen by the 'dark side' if you give them half a chance...


C++ Code to Implement an Abstract Interface ?

In Visual Studio 2005 and using C++, how can I implement the


properties and methods of an abstract interface that I have imported from a type library (.tlb file)? (What functions do I need to call, what pointers do I need to create, etc.) Also, what type of Visual Studio project do I need to create in order to accomplish this?

C++ Code to Implement an Abstract Interface ?
There is no such thing as an Abstract Interface.





Interfaces are not supported with (ISO) C++. You should use an abstract class with only virtual methods.





A .tlb file is (I'm guessing) a Type Library. These are used with COM/ActiveX controls.





Type of Visual Studio project: .... a C++ project I guess





If you are using managed C++, you can just add a reference to the COM object, which should add a RCW you can use (a wrapper around the object referenced). This will do most housekeeping for COM/ActiveX objects for you.
Reply:Here is a resource to do that.


C/2006 P1 - When, where.......???

I've heard that the C/2006 P1 will be visible on January 20th. I got a 6in Dub...what will I be able to see and where and when should I look? Also, I got the intelliscope, does anybody know the object's name in the intelliscope's library?

C/2006 P1 - When, where.......???
C/2006 P1 is comet McNaught, and it's visible around sunset in the west. I'm told it's visible in the twilight, so look where the sun's setting and you should be able to see it with the naked eye. If you're going to use a 'scope be Very Careful not to look at the sun!! The weather hasn't been kind to me, but I'm told it's bright, with a very long tail.





I don't believe it's going to be visible until the 20th - you've probably got 2 more days to see it.
Reply:try www.space.com or





http://astroprofspage.com/archives/591


Mystery Books: C is for Corpse?

C is for corpse:


who are the characters


the problem


a summary


ending


please tell me! my library doesn't have the book and my parents won't let me buy it and I have a book report due! please tell me!

Mystery Books: C is for Corpse?
I haven't read the book or any of the series, so I guess you'll have to pick up what you can on-line. I suppose at this point it's too late to tell your teacher you can't get the book? Did you wait too long? I'm going to guess that's why your parents won't help. I hope so, though what a tough way to learn your lesson. I'm pretty sure you could have bought a used copy on Amazon for 1 cent plus $3.49 for mailing - I may even have a copy on eBay for cheaper than that (price plus shipping).





Try Amazon and read the summary and reviews. You can also search in the book, though I don't think to the extent of reading it.





There are probably websites for fans of the series, too. Good luck. I surely don't envy your position - doing a report on a book I haven't read. Yikes!

song titles

C++ question about imput using cin?

Just a quick one.( I'm using a library computer so I don't have access to a compiler)





If I were to prompt for a value from the standard input stream (keyboard) and use the statement;





int num1,num2;


cin%26gt;%26gt;num1%26gt;%26gt;num2;





And when I run the .exe and get the following output:





"Please enter two numbers:"





To which I type in the following:





24 25





Which is 3 spaces, the number 24, 3 spaces, the number 25 and 2 spaces. Will the variables num1 and num2 receive the vals 24 and 25 as expected? So spaces play a part in this


input or is C++ smart enough to pick out the numbers from the stream I provide from the keyboard?

C++ question about imput using cin?
cin ignores whitespace, so any thing like a space or return character regardless of the number of them are ignored. So yes, num1 would be 24 and num2 would be 25.


Visual C++ Express 2008 progamming to include hid.h and hidsdi.h?

here is part of my code





extern "C" {





#include "hid.h"





#include "hidsdi.h"





#include "process.h"





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





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





}





this is the error i get during compile:


|| Cannot open include file: 'hid.h': No such file or directory ||


i already have windows DDK installed.. how do i solve this problem?? do i add the directory of the headers file?? or add the library of the hid files to the linker??

Visual C++ Express 2008 progamming to include hid.h and hidsdi.h?
have you setup include directories and lib files in vc++?? if not here is a link that teaches you how to setup vc++ express edition 2005.. i hope setting up 2008 is also similar. Also Remove the inverted commas and use angular brackets because inverted comma limits the searching of files within one particular path...you have to add the path of the hid.h file to the include path list in tools-%26gt;options-%26gt;(on the left pane) projects and solutions-%26gt;vc++directories-%26gt;(on the right pane show directories for include files)-%26gt; and add the folder in which hid.h is present...


Can any1 give me standard procedure for calling java method from "c++" using vc++?

basically it invovles invoking JVM....


i tried but got errors !


i tried as follows =%26gt;


created .java ,.class,.h files using javac,javah cmds.


opened vc++ =%26gt; win32 appl'n %26gt; c++ file as source


program is @ sun site JNI specification book ! invocation api's chapter...simple hello world program...


then i set paths of library at file jvm.lib.


set the preprocessor path to jni.h means C:\j2sdk1.4.2_05\include


and run ....


gives many errors linking error like


Linking...


LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16


Debug/ltry.exe : fatal error LNK1120: 1 unresolved externals


Error executing link.exe.


ltry.exe - 2 error(s), 0 warning(s)





sometimes gives error C:\ltry\tr.cpp(18) : warning C4129: 'j' : unrecognized character escape sequence


in code @


options[0].optionString="-Djava.class....





can any1 tell me valid procedure ?


do u hav anyother gud book for invocation api's?


Thanks Amit

Can any1 give me standard procedure for calling java method from "c++" using vc++?
I dont know what the probelm is but it does work when i refer


the docs.





But the procedure will br something like


1. Create a JVM Instance


2. Create an object of the Java Class


3. Call the Method.





The Names will be something like


Java_ClassName_MethodName( Para List );


C++ Programming HELP?

I have no idea of where to start on this assignment:


Write a program that displays all the prime numbers between 50 and 100.


A prime number divides only in 1 and in itself.


Note: You can make it more efficient by checking the divisors of N from 2 and upto


square root(N), instead of (N)).


There is a library function called sqrt(n) which is included in the %26lt;math.h%26gt; header file.


sqrt(n) returns the square root of n.


File name: prime.c





please help me, totally lost here

C++ Programming HELP?
wow that's a tuffie
Reply:seems easy try this.


start checking every number to see wether it is prime or not!(you need a for struct)


for checking if a number is prime or not you need for that checks (your number)mod (another number from 2 to sqrt(your number))


if it is 0 you will write count++


and at the end if count is=0 print the number!


if it needs more explanation let me know
Reply:for(int i = 50; i %26lt; 101; i++)


{


for(int j = 0; j %26lt; Math.sqrt(i); j++)


{


if(i/j != 0)


{


printf("%d", i);


}


}


}





at least that's the general idea...
Reply:#include %26lt;iostream%26gt;





using namespace std;





void main()


{


cout%26lt;%26lt; "53 59 61 67 71 73 79 83 89 97 " %26lt;%26lt; endl;


}
Reply:OK. Let n be the number you're testing to see if it's a prime. This will start at 50 and increase to 100.





Function to test if n is a prime:


Let f be some number that you think may be a factor of n (start with f = 2), and let g = 1.


If (n % f) == 0, then n is a multiple of f and therefore not prime, so return false.


Otherwise: let f += g.


If f == 3 then let g = 2.


If f %26gt; 5 then let g = 6 - g.


If f * f %26gt; n, then f is bigger than the square root of n, meaning n must be prime so return true. Otherwise, test (n % f) again.





Note: you don't actually need to evaluate the square root at all. Doing an integer multiplication on each iteration is still quicker, on average, than evaluating a square root once! This is because most numbers are not prime, so you will usually drop out of the loop before doing this multiplication too many times. The reason for alternately adding 2 or 4 (which is what g does) is so you skip over all odd multiples of 3, which are not prime and so needn't be tested as potential factors (since their factors have already been tested). So the sequence goes 2 (miss 1) 3 (miss 2) 5 (miss 2) 7 (miss 4) 11 (miss 2) 13 (miss 4) 17 %26amp;c.





Note also: You could do the "alternately adding either 2 or 4" thing with n, and it would be a little more efficient since you are eliminating all multiples of 2 and 3 (though these will get rejected in 1 or 2 iterations anyway). But 50 doesn't fit this sequence, and starting with 53 would be cheating.

song downloads

Using exponent in C++ Visual Basic 2005 Express Edition?

Pretty straightforward, how can you use exponents in C++ visual Basic 2005 Express edition. The internet has conspired against me, and the textbooks we are using are for a outdated C++ version. It would be most appreciated for someone to show me how to do a simple function such as (3.0 * 10^8) and show me which library to use.

Using exponent in C++ Visual Basic 2005 Express Edition?
//


// Done in Visual C++ 2005Express Edition


//


#include %26lt;iostream%26gt;


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





void main()


{


double val = 0.0;





val = 3.0 * pow(10.0, 8.0);


std::cout %26lt;%26lt; "3.0 * 10^8 = " %26lt;%26lt; val %26lt;%26lt; "\n";





val = pow(3.0, 8.0);


std::cout %26lt;%26lt; "3.0 ^ 8.0 = " %26lt;%26lt; val %26lt;%26lt; "\n";


}








///// --- output --- ////





3.0 * 10^8 = 3e+008


3.0 ^ 8.0 = 6561


Need help in C language?

how to convert a char to other case in C language.





for eg. char letter='a'


then output should be A.





the problem is, it has to be done using bitwise operators.


i suppose not to use any standard library functions.





its an exercise given in "art of assembly" chapter 1 (p-63 1st problem)





for eg. ascii of a is 65 and that of A is 97


and in binary 65(A) is 0100 0001


whereas ...... 97(a) is 0110 0001





notice the sixth bit from right.


It decides the case of the letter.





I hope, NOT logic operation on this bit could change its case.





Adding 32 (0010 0000) or 20h does some work in converting.


it converts upper case to lower case.





eg. 0100 0001(A) + 0010 0000 (32)= 0110 0001(a)





But i dont know how to do so in C language.


Please help.





also help me by explaining the operators used in C to manipulate bits.

Need help in C language?
You can use the XOR (exclusive or) bitwise operator to flip the 6th bit. That will convert 'a' to 'A' and back again:


0100 0001 XOR 0010 0000 = 0110 0001


0110 0001 XOR 0010 0000 = 0100 0001


or, in decimal:


65 XOR 32 = 97


97 XOR 32 = 65


The C bitwise operator for XOR is the caret: ^


65^32 will give you 95.


97^32 will give you 65.
Reply:Hi,





Firstly you need to select only the lower case letter so we assume you can do a sample check as in





if (letter %26gt;= 'a' %26amp;%26amp; letter %26lt;= 'z')





and if it is then bitwise and as in





letter %26amp;= 0xDF





or





newletter = letter %26amp; 0xDF





Hope this helps.
Reply:I don't know C specifically, but if it's anything like C++, create a char variable, initialize it as 'a', and add 32... You can manipulate and compare chars and strings mathimatically, because that's basically how their stored
Reply:If your char is called cAlpha you would do this -





cAlpha = cAlpha %26amp; 0xdf;





or -





cAlpha %26amp;= 0xdf;





or what I tend to use -





cAlpha %26amp;= ~0x20;





This is the bitwise AND operator. It always clears bits to that are zero in its argument. The argument is often refered to as being a mask. 0xdf is '1101 1111' in binary. The sixth bit is zero the rest are set, the sixth bit of your value will be cleared, the rest will be left as they are.





In the third example I use the bitwise NOT operator '~' to create the mask. This swaps every bit in the value. In this case 0x20 (0010 0000) becomes 0xdf (1101 1111). I do this because its often easier to understand code if it shows the value that is being cleared rather than its mask.





The OR operator '|' always sets bits to one.


The XOR operator '^' swaps bits.





In the case of alpha characters you have to be careful. 'a' is 97 'z' is 122, they don't cover the entire range of number range of that bit. If you always applied the mask you will change all the chars between 96 and 127, 160 and 191, 224 and 255.





You need a piece of code that says -





if (cAlpha %26gt;= 'a' %26amp;%26amp; cAlpha %26lt;= 'z')





before the bit twiddling. Note that's a logical AND operation in the if statement.


C++ Graphics placment question?

The text's graphics library places the origin of its coordinate system in what position by default?








a) center of the screen








b) lower left hand corner of screen








c) upper left hand corner of screen








d) lower right hand corner of the screen





AND it's NOT 'C' (I made sure)

C++ Graphics placment question?
I would say the center of the screen - A.


The other answers sounds bogus (except for C).
Reply:C++ doesn't know anything about graphics, however various graphics libraries do provide those capabilities. Since you neglected to tell us what libraries you are using no help can be provided.


[C++] Firewall Tutorial?

Okay, So basically in C++ i want to create a kind of firewall. I want my firewall to be able forward ports or block them. How in C++ would I create a firewall for Windows. That can either block a port or forward a port to a certain IP Address. What library would I use? (Already searched Google, found a bit but nothing good) Any good resources (Books or web)? And any other information you got?





Daniel

[C++] Firewall Tutorial?
http://www.codeproject.com/managedcpp/po...


http://www.symbian.com/developer/techlib...


Like yahoo answers but for programmers. Might be worth checking out:


http://www.thescripts.com/forum/register...

sending flowers

When using the quadratic formula to solve a quadratic equation ax2 + bx + c = 0, the discriminant is b2 - 4ac.

When using the quadratic formula to solve a quadratic equation ax2 + bx + c = 0, the discriminant is b2 - 4ac. This discriminant can be positive, zero, or negative. (When the discriminant is negative, then we have the square root of a negative number. This is called an imaginary number, sqrt(-1) = i. )





Explain what the value of the discriminant means to the graph of y = ax2 + bx + c. Hint: Choose values of a, b and c to create a particular discriminant. Then, graph the corresponding equation.


Search the Library and Internet. In the real world, where might these imaginary numbers be used?

When using the quadratic formula to solve a quadratic equation ax2 + bx + c = 0, the discriminant is b2 - 4ac.
Let the discriminant be D = b^2 - 4ac





If D = 0,


there will be equal roots to the equation (i.e one solution)


The graph will "touch" the x-axis at the stationary point of the curve.





If D %26gt; 0


discriminant is positive; equation has two distinct roots (two different solutions). Graph cuts x-axis at two points.





If D %26lt; 0,


discriminant is negative, equation has NO REAL solution (might have imaginary solutions). Graph does not intersect with x-axis.
Reply:if discriminant %26gt;0, the two roots are real and the graph(parabola) cuts the x axis in two points.


if the discriminant is zero, it has two equal roots, the x axis is tangent to the parabola, touches it at one point. if the discriminant is negative, the two roots are complexand the paraboladoes not have intersection with the x axis.


Learning C++?

I'd like to learn how to code native Windows applications using C++. Can anyone recommend a website that will teach me?





I'm using Visual Studio 2005 (I know VB already), but I don't want the final applications to be dependent on the user having the .net framework installed.





What, in simple terms, do MFC and ATL mean? I've gathered that they are some kind of library, but do they need installing on users' computers separately?





Thanks








BTW I do have some basic C++ knowledge regarding command line applications

Learning C++?
MFC is a C++ class library which encapsulates the Windows API. ATL is the advanced template library, it contains stuff for COM programming and GUI programming (i think).





If you want to write native Windows applications, you find a lot of articles on codeguru.com. Also, there's a book by Microsoft Press, written by Charles Petzold, which is a kind of a reference.





The Windows API is a C API. So either you use C functions in C++, or you have to use a C++ wrapper like MFC or WxWidgets or QT.
Reply:MFC was sort of the pre-cursor to .Net. It's not quite as useful to .Net, but if you use that API you get a more organized object oriented layer on top of the Windows API. MFC is standard with Windows, so if you target that API you won't have any dependencies that Windows users won't already have installed.





ATL is just the abstract template library, it's also pretty standard and all Windows installations should have it.
Reply:codeproject .com wud be best for ya





then try gcc compiler





MFC-microsoft foundation classes


atl activex template library


partially yes
Reply:man u doing some crazy work, but i can tell u to have encarter 07 installed, thru web companion and see if that helps.


Please give me short note of my C++ program...?

Problems are taken from C++ Primer book





-Ensure you can complete prior to accepting and emailing me.





-If you do not provide your price to do this I will not respond…





-I require this completed in 1 week.





Exercise 13.3: Assuming Point is a class type with a public copy constructor, iden¬tify each use of the copy constructor in this program fragment:


Point global;


Point foo_bar(Point arg)


{


Point local = arg;


Point *heap = new Point(global);


*heap = local;


Point pa[ 4 ] = { local, *heap };


return *heap;





______________________________________...





Exercise 13.10: Define an Employee class that contains the employee's name and a unique employee identifier. Give the class a default constructor and a constructor that takes a string representing the employee's name. If the class needs a copy construc¬tor or assignment operator, implement those functions as well.





______________________________________...








Among the fundamental operations a pointer supports are dereference and arrow. We can give our class these operations as follows:


class ScreenPtr { public:


// constructor and copy control members as before


Screen %26amp;operator*() { return *ptr-%26gt;sp; }


Screen *operator-%26gt;() { return ptr-%26gt;sp; }


const Screen %26amp;operator*() const { return *ptr-%26gt;sp; } const Screen *operator-%26gt;() const { return ptr-%26gt;sp; } private:


ScrPtr *ptr; // points to use-counted ScrPtrclass








Exercise 14.20: In our sketch for the ScreenPtr class, we declared but did not define the assignment operator. Implement the ScreenPtr assignment operator.





______________________________________...





Exercise 14.21: Define a class that holds a pointer to a ScreenPtr. Define the over¬loaded arrow operator for that class.


______________________________________...








Exercise 15.4: A library has different kinds of materials that it lends out—books, CDs, DVDs, and so forth. Each of the different kinds of lending material has different check-in, check-out, and overdue rules. The following class defines a base class that we might use for this application. Identify which functions are likely to be defined as virtual and which, if any, are likely to be common among all lending materials. (Note: we assume that LibMember is a class representing a customer of the library, and Date is a class representing a calendar day of a particular year.)


class Library { public:


bool check_out(const LibMemberk);


bool check_in (const LibMember%26amp;);


bool is_late(const Date%26amp; today);


double apply_fine();


ostream%26amp; print(ostream%26amp; = cout);


Date due_date() const;


Date date_borrowed() const;


string title 0 const;


const LibMember%26amp; member() const;





______________________________________...








Exercise 15.8: Given the following classes, explain each print function:


struct base {


string name () { return basenatne; }


virtual void print(ostream %26amp;os) { os « basename; } private:


string basename;


};


struct derived {


void printO { print (ostream %26amp;os) ; os « " " « mem; } private:


int mem;


};





If there is a problem in this code, how would you fix it?





______________________________________...








Exercise 15.13: Given the following classes, list all the ways a member function in Cl might access the static members of ConcreteBase. List all the ways an object of type C2 might access those members.


struct ConcreteBase {


static std::size_t object_count(); protected:


static std::size_t obj_count;


};


struct Cl : public ConcreteBase


{ /* . . .*/};


struct C2 : public ConcreteBase


{ /* ...*/};





______________________________________...





Exercise 15.25: Assume Derived inherits from Base and that Base defines each of the following functions as virtual. Assuming Derived intends to define its own ver¬sion of the virtual, determine which declarations in Derived are in error and specify what's wrong.


(a)Base* Base::copy(Base*);


Base* Derived::copy(Derived*);


(b)Base* Base::copy(Base*) ;


Derived* Derived::copy(Base*) ;


(c)ostreamk Base::print(int, ostream%26amp;=cout);


ostream%26amp; Derived::print(int, ostream%26amp;);


(d)void Base::eval() const;


void Derived::eval();

Please give me short note of my C++ program...?
This kind of stuff, where you pay for someone who codes for you would be best accomplished at http://www.rentacoder.com or http://www.guru.com
Reply:And that is a fact since it goes against community guidelines and rules and will be *REPORTED*.
Reply:looks good to me