Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Ivor Horton's Beginning Visual C++ 2010
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Ivor Horton's Beginning Visual C++ 2010
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2010 by Ivor Horton; ISBN: 9780470500880
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 13th, 2013, 10:54 PM
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default intelli-sense sometimes works and sometimes doesn't

visual studio 2012, c++
when for example in main and i want to type the line
long x=2;
when i start typing lo it finds long but does not highlight it so
that after for example typing lo crt it will output lo on the line

it is annoying and i don't see any way to tell it to make its best guess
at what i am typing.

sometimes it does work for example in a class i have created it will
do the member function correctly.

however in the enums that i create it again lacks foresight!
  #2 (permalink)  
Old January 13th, 2013, 11:22 PM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 66
Thanks: 0
Thanked 4 Times in 4 Posts
Default

See if the post by Ulzii Luvsanbat here helps:

http://social.msdn.microsoft.com/For...-03850eeaa4fe/

regards,
drpepper
  #3 (permalink)  
Old January 14th, 2013, 10:34 AM
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

the link was very informative. thank you! the bottom line was that they suggested that i download SQL CE which i did since my installation may not have done so.

however when i did this it infact found a more recent version of SQL CE on my machine amd 64 dual processor. i did download the 64 bit version.

still has this feature as i described above.

david
  #4 (permalink)  
Old January 14th, 2013, 12:46 PM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 66
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I have a couple of suggestions for you. The first is not related to the topic you questioned.

This one is not related to your problem, but it is very important! Your screen name looks like an email address. If it is, this represents a huge hole in your security. Anyone can view it. It would be wise to find a way to change your screen name if this forum allows you to do so.!

OK ... Now for the problem you are encountering:
My Introduction to Programming class taught a method for creating projects which differs from the ones described in the book. I ignore intellisense when I type code; so I have not noticed whether or not I see the same thing you see. (Personally, I find that I remember the proper syntax better if I don't rely on the computer to finish what I am typing.) You may wish to try the following two things.

Use expert settings. This provides enhanced features in the IDE. To enable , navigate:
  1. tools
  2. settings
  3. check expert settings
One of the features expert settings enables is start without debugging. This is very helpful when checking a program for bugs. (see the next instructions for how to use this.) This setting will not change when you start a new project. You can reset it at any time.

The other difference is in opening a new project. The method I describe below requires you to enter your own preprocessor directives and all other parts of the program manually. It is a little more work, but as you progress it becomes more obvious what everything does. Errors resulting from missing lines create failures when building projects. Knowing precisely what is and is not needed is a great aid in debugging. From a learning standpoint this is well worth the extra time and effort involved.

Be sure to follow these steps in the order listed. These instructions are for a Win32 console project. For other types of projects, make the appropriate changes to the instructions. After doing this a few times, it does not seem nearly as long. As a bonus you have more control over your code.
  1. click new > project
  2. click Win32 in the left pane of the window
  3. click Win 32 console application in the right pane of the window
  4. type a name for the project
  5. choose a location for saving the project ( default location is OK)
  6. click OK
  7. click next
  8. it is very important to do the next two steps in the order listed
  9. click on precompiled header to turn it off
  10. click on empty project to turn it on
  11. click finish
  12. right click on source files in the solutions explorer window
  13. click add > add new file
  14. click on C++ file
  15. enter the name of the program
  16. type the program
  17. compile the program: click build > build solution
    • no syntax errors: run the program by clicking debug > start without debugging
    • syntax errors: fix them and repeat step 17 until there are no syntax errors
  18. use test data to verify proper program results
    • correct results returned: you are done
    • incorrect results: go back to step 16 and make corrections in the code of the existing program and recompile, etc. (steps 17-19)

I hope you find this helpful. Let me know if your problem is resolved.

regards,
drpepper
  #5 (permalink)  
Old January 14th, 2013, 07:12 PM
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

i have constructed my project typically using the empty console appl. with no precompiled header.

my tools does not have a settings item.

when i compiled a new project (had to manually include a main() fn)
the same lack of intelli sense was there. try in your cpp file typing long x=3;

as your typing long does it find "long" AND highlight it?

i have posted t his querry into tech republic and slayer has said that he has some bizarre effects with intelli sense.

i think this is fundamental with the intelli sense with c++. they seem to have had this problems years ago. i am surprised that they haven't fixed it yet (2012 version)

i appreciate your comment on the use of email address and will cease to do this in future. i saw no obvious way to change this in p2p.

i am surprised that you don't use intelli sense. for me it not only keeps track of my member functions together with the syntax but with all the system functions.

i have migrated just recently from vb6 and vc6 to .net. vb6 had some very limited intelli sense but vc6 had none. i should note that my recent learning with visual basic had intelli sense that did not seem to have problems.

i will live very well with the intelli sense that i have. i simply thought that there might be some setting that i was missing. from my experimenting the last 2 days i am beginning to think that this is a feature of intelli sense for c++.

thank you for your interest and help.

david
  #6 (permalink)  
Old January 15th, 2013, 01:58 AM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 66
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
i have constructed my project typically using the empty console appl. with no precompiled header.
To make that work properly, you must turn precompiled header off before turning empty project on.

Quote:
my tools does not have a settings item.
Do you have the express version or the paid version? I have the express version. I don't know for sure, but I think customize under tools may allow you to add settings.

Quote:
as your typing long does it find "long" AND highlight it?
No it does not.

Quote:
i am surprised that you don't use intelli sense.
This is a matter of personal preference. It is probably because I am old school. I tend to ignore hints given by the computer. In applications like MS Office I find them intrusive. Also I find that I learn better if I don't rely on this type of feature. It may make me less efficient, but I learn and remember more when I do it myself.

Quote:
i appreciate your comment on the use of email address and will cease to do this in future. i saw no obvious way to change this in p2p.
I found this in the FAQ:
How can I change the information in my profile?
It is your responsibility to keep the information in your profile up-to-date. You should especially ensure that your email address is kept current. You can alter any of the fields in your profile, except your username. Once you have registered your username, it becomes yours for life. In extreme circumstances, you may request that the administrator change your username, but he or she will require a very good reason to do so.


Nothing ventured, nothing gained. I would attempt requesting that an administrator make the change for you. If all else fails, I suppose you could register a new account under a different email address. You are new enough in the forum that you probably would not loose much. After a while the old user name would (hopefully) become too obscure to be an issue. That's just me. I am very security conscious because of problems I encountered a few years ago.

You have a great deal more programming experience than I. My comments about intelli-sense are a matter of my perspective. Please don't read my comments as criticism. I can see why you use the feature in more complex programs. Just out of curiosity, do the various options under the view tab and in the solution explorer window help keep track of member functions, classes, etc. adequately?

regards,
drpepper
  #7 (permalink)  
Old January 15th, 2013, 10:37 AM
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default intellisense

i don't know how to comment as you did so i will try to make comments in order.

i have paid professional 2012. have always had precompiled headers turned off.

i will change my name profile in the future as i think this is a good suggestion.

HTML Code:
" do the various options under the view tab and in the solution explorer window help keep track of member functions, classes, etc. adequately?
yes. my only small objection was the elemental keywords that are found but not highlighted. viewing other forums on intelli sense it seems to be a long standing problem(feature) of c++ and intelli sense. and people have gotten into lots of trouble trying to fix this feature. i am glad that your machine is working the same as mine when typing long x=3; this tells me that the problem is not mine but microsofts.

i am quite happy with my migration from vb6,vc6 to visual studio. i do have to port my code into this new environment which i am starting and is not as bad as i feared.

the tools we have now for developing code are most incredible to me. we've come a long way from the first edit tool i had which was the means for editing you program on a paper tape by either making a new tape or if possible adding new holes to a line in the tape. -- university of illinois ~ 1963 -- on the illiac 1 a vacuum tube computer. but you have to understand that it was really very exciting to see what we could do beyond which we were able to do in the past. i think we sensed a new era without having any conception of where we would be in50 years.

thank you for your help.

david
  #8 (permalink)  
Old January 15th, 2013, 12:22 PM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 66
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
i don't know how to comment as you did so i will try to make comments in order.
Most forums I have posted in have the quote tag feature, and its use is very similar everywhere I have used it. Here is how to employ the quote tag.

Look at the text editor used to post or reply. Above the white box where you type the text there are several letters and symbols. ( B, I, U, etc.) Hover your mouse over each one , and a little tool tip box appears which tells you what it is for. The symbol for the quotes I used looks similar to the dialog balloons used in comic books and comic strips in the newspaper.

When you find the one you want to use, there are two methods which work equally well to format your post.
  1. Click the symbol.
    • The tags will be inserted into the text editor in the place where the cursor is located. The cursor will be located between the tags.
    • You have the option of typing whatever you want to be formatted by the tag, or you can copy and paste from another location to the place between the tags.
    • Example using bold: I can't use the tags in as they appear in the text editor because they will format, not show you. open square bracket [ , the capital letter B, close square bracket ], open square bracket [ , forward slash / , the capital letter B, close square bracket ] . The text goes between the close bracket and the open square bracket. [bold tag]text goes here[/bold tag]
  2. Highlight whatever you want to format, and click the symbol. Use one of the options above to insert text.

In the case of quoting portions of your reply, there are extra steps. The first step is one which is not common to all forums I have been active in. You just have to experiment from one forum to another to see how this works.

When you view the empty text box you have two options. You can use the quick reply in the reply to thread box, or you can look above the reply to thread box to find a reply button. I use the reply button. This gives me advanced features.

Then I click the quote symbol (icon) above the text editor. Once I have done that, I scroll down to the post where the text I want to quote is located and copy it by highlighting it and pressing ctrl and c at the same time. I scroll back to the text editor and click between the quote tags to place the cursor there. Pressing ctrl and v at the same time inserts the text into the quote tags. The result is the formatting you viewed in my last reply.

The boxes and symbols above the ones I just described allow you to change font style, size, etc. by clicking the down arrow to reveal a menu to choose options from. It is really very simple point and click programming to give custom formatting. Play with it a little. You will enjoy it.

Quote:
i will change my name profile in the future as i think this is a good suggestion.
Please let me know if you have any success with the moderators in changing your name. I may be able to use the information at a later date to help someone else.

As for your programming experience, I envy you. My first contact with computers was in a course named Computer Math in high school in 1969. The machine was IBM 360 with magnetic tape drives, line printer, card readers, and card punch machines. I learned a little Fortran IV and Assembly. I wanted to pursue a degree in computers, but life events prevented me from doing so. My first substantial computer contact after that was in January, 2010.

Regarding visual C++ version. I have Visual C++ Express 2010. You have more power and features than I. You may already have expert settings selected by default in your version. A quick way to check is to click on the Build tab above the text editor and see if Build solution is one of the options offered. Note that you must have a project open to see the build tab.

I hope this proves to be helpful.

regards,
drpepper
  #9 (permalink)  
Old January 15th, 2013, 11:50 PM
Registered User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default intelli sense

Quote:
Please let me know if you have any success with the moderators in changing your name. I may be able to use the information at a later date to help someone else.
i will. i think i am going to try to re register with a new name.

i think i am getting the hang of this. thanks to you again.

Quote:
As for your programming experience, I envy you. My first contact with computers was in a course named Computer Math in high school in 1969. The machine was IBM 360 with magnetic tape drives, line printer, card readers, and card punch machines. I learned a little Fortran IV and Assembly. I wanted to pursue a degree in computers, but life events prevented me from doing so. My first substantial computer contact after that was in January, 2010.
it has been fun but a continuous struggle with brief moments of satisfaction. i also have done some machine code -- in whats called embedded software. it gave me a real feel for pointers.
and i have done a little time with fortran- as little as possible. i gave fortran up quickly when basic came out. and i did basic for ~15 years but then decided to migrate to c. i spent about 1 week at c before moving to c++. it was ~1984 and c++ borland had just come out with a c++ compiler. i decided not to spend the next 15 years with c before i went to c++. the oop in c++ was a godsend in that i had been doing some modeling of physical situations and objects were a natural way to describe the problem and to find the solution.

you know much and are quite willing to experiment. i have gained from our exchange. so thank you again.

as a last question, do you know any way from the keyboard to delete the entire line that the curser is on. it is a handy thing that i was able to do in vb6.

david

Last edited by folly; January 15th, 2013 at 11:53 PM..
  #10 (permalink)  
Old January 16th, 2013, 02:02 AM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 66
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I'm happy to hear that you are going to attempt to change the screen name. My friends think I am too security conscious, but when they have a security issue, they come to me for help.

Yep, you have the hang of using the quote tags. When you have time you may wish to hover the mouse over the other icons to see what they do. It is easy to play with them to become familiar with the features. Just experiment in the text editor and click the preview post button to see the results. It will open a whole new world for you.

Quote:
as a last question, do you know any way from the keyboard to delete the entire line that the curser is on. it is a handy thing that i was able to do in vb6.
As a matter of fact I do! Use either your mouse or the arrow keys to navigate to the line you want to delete. The cursor can be anywhere on the line. Hold the shift key, and press the delete key. Bingo! The line is gone.

Here is a little bit of bonus information to go with that. Hold the control key and press z. The line will be restored. Control plus z will undo whatever you did last. Doing it more than once will continue to undo things one at a time. How many times does it work? I have no idea.

Quote:
so thank you again.
You are quite welcome. I really enjoy helping others. There is a Thanks button near the bottom of the post after it has been submitted. If you would like to make your thank you public, that is how to do so. I am not asking you to click Thanks. I am just telling you another feature provided by the forum.

If you have any more questions, fire away.

regards,
drpepper

Last edited by drpepper; January 16th, 2013 at 02:04 AM.. Reason: typos
The Following User Says Thank You to drpepper For This Useful Post:
folly (January 16th, 2013)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Incorporate Intelli Type/Auto Fill into our database David92595 SQL Language 0 February 29th, 2012 06:00 PM
How to sense mouse clicks & other user input while app is busy mike123abc Pro VB.NET 2002/2003 1 December 7th, 2009 09:55 AM
Making sense of of PHP/SQL C/M/R lord_midnight Beginning PHP 0 November 23rd, 2008 05:50 PM
works bryan.lugo Excel VBA 0 April 19th, 2006 02:47 PM
Does this question have any sense prashar SQL Language 2 October 24th, 2005 01:50 PM



All times are GMT -4. The time now is 02:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.