RSS

Visual Studio 2008 Interview Questions and Answers 


 

Visual Studio 2008 Interview Questions and Answers
Why does this fail?

class base {
public:
    base() {};

    virtual void func(string str) {return;}
    virtual void func(int) {return;}
};

class derived : public base {
public:
    derived() {};

     virtual void func(int) {return;}
};

int main(...)
{
    derived d;
    d.func( string("test") ); // Fails, does not recognize method
    ...
}

The actual error from MS Visual Studio C++ 2008:
error C2664: 'derived::a' : cannot convert parameter 1 from 'std::basic_string...' to 'int'

Why can't the compiler recognize the inherited func(string) method from the base class when I override the func(int) version? Whether base::func(string) is defined as virtual or not makes no difference, and if it is not overridden in derived, I can access both methods.

My intention is that the string implemenation will simply be inherited as-is by derived, and the int version can be overridden for new functionality.

Thanks in advance!
Hey well I'm new to the whole linux world. I'm also new to programing, I only have a semester's experience in C++. I'm trying to make a new project in eclipse but don't know much on how to use eclipse. I just used visual studio pro 2008 all this time. So when I experimented a little on how to make the new project I just installed Eclipse with this command: sudo apt-get install eclipse eclipse-cdt eclipse-pyde. I'm also guessing that it had added the python plugin as well, which I wanted. But I tried creating a new project by: File>New>Project>Managed Make Project C++. Then I gave it a name. Added a source file like I do in visual studio and did a basic hello world program. Then I noticed that it would build the project (auto) so I took that off and set it to (man) I built that project and got an error message about no binaries. I seriously don't know much on how to build it either so maybe I did something wrong in the process. I'm a total in this newb please explain it lightly!!!
Ok, so I have yet another question pertaining to computer programming *I'm on a roll!*

I am an absolute beginner at computer programming, and I want to get started THIS SECOND! Lets just say I have an experience level of 0, although that is not true, I want to start at the very beginning. The only experience I have had with programming and writing any type of code is HTML, actionscript, and a little (I mean extremely little) bit of experience with asp.net, c#, and c++ (all from just messing around).

I would really like to begin learning right away, but I don't have a clue where to start! Not to brag, but I do know a lot about computers...I am a geek...lol. I learned HTML from W3Schools, online tutorials, and by experimental methods, and I learned actionscript strictly from online tutorials, then most of it just came to me. I just cannot seem to find that edge to begin learning how to program in other languages or even which language to begin with!

I downloaded Microsoft's Visual Studio Express 2008 Edition, which includes Visual C#, Visual Basic, Visual C++, and Visual Web Developer. I don't know if I made a good move in downloading this software studio, but the programs are very nice, although I don't know much about actually creating stuff in them!

I read about object oriented programming...what is that?? I also asked a question on here yesterday about the best language to begin to learn. Most said C++ but I thought BASIC was the most "basic" language and the easiest to learn?

I am basically a newbie eager to learn but I need some guidance to get going! Can you recommend a few good *active* online forums, tutorial websites, ebooks, and books for the beginner programmer?

I really appreciate all the help I can get!
Thanks!
I download XNA Game Studio 3.0 and Microsoft Visual C# 2008, but i cant connect my Zune to the software to install games in it.
I searched the Internet and found out the XNA 3.0 will only work with Zune 2.5 (mine is 3.0).
So when will XNA release a new software that will work with Zune 3.0?
Or will there be another way to get games into Zune?
I have the older 30gb Zune, and I downloaded the latest updates for it and the device, okay! Now when I downloaded Microsoft Visual C# 2008 Express and XNA Game Studio they all installed correctly. Now when I try to open C# then click on the XNA game icon (monitor with an 'X' on it) it opens the XNA Game Studio Devices box, it picks up my zune but displays this when trying to Connect:

System.Runtime.InteropServices.COMExce... (0x80004005): Could not connect to 'Faithful1db891'. Make sure the device is connected to the computer and not busy syncing content.
at Microsoft.Xna.RemoteServices.ZunePrimary... hostId, Session session, Int32 millisecondTimeout, StringBuilder diagnosticBuilder)
at Microsoft.Xna.RemoteServices.HostConnect... diagnosticBuilder)
at Microsoft.Xna.RemoteServices.HostConnect... millisecondTimeout, StringBuilder diagnosticBuilder)

I'm so confused, I reinstalled everthing, Zune software, C# express, and XNA studios, plus I have the Zune software closed when I tried this! Whats wrong? EVERYTHING is up-to-date too!?
At work, all my development for Vista is done using Visual Studios .Net 2005 & 2008 -- I was just curious if I compiled a traditional Win32 project (ie. Borland C++ Builder, Visual Studios 6.0, etc.) would they run under Vista?

I know I could find the answer easily enough by installing Vista on my VM at home, but I'm feeling lazy.

Thanks!
I'm trying to run Trillian in Wine under Linux, however, there are a few DLL's which aren't implemented yet. One of them is MSVCP90.dll. I found out it's part of Visual Studios 2008, but I don't want to download any program from Microsoft, trying to keep Wine as unmodified as possible. Does anyone know a website which I can download this DLL only? I tried http://dll-files.com/, but they don't have this one yet.

Thanks!
I am just learning as you'll be able to tell by my question. I need to....
Create a project with a single text box. In the Resize event of the form, show the Width of the form in
the text box. I have Visual Studios 2008.
Thanks to any help in advance!!!
Hi People,

First I was downloading iso file of complete setup & I was downloading the same in firefox & after 600 MB download my net connection was stopped for only two or three seconds.

After that I came to know that I have lost the file & the download was stopped & I tried pause & start but nothing happened.

Could tell me any software to download partly or giving break.

********Thanks A Lot********
Alright I am desperate for a little help on this. I am taking my first computer programming class and we started out with C++ I have an assignment that's due Friday morning. This is a college class but I cant seem to get started. He posted the lab on his website here's the link
http://north.ecc.edu/streller/cs_111/CS1... I have visual studio 2008 and I cant figure out where to start I have read the book and went to class but I could really use a hand, thank you
1>------ Build started: Project: Lab5, Configuration: Debug Win32 ------

1>Compiling...

1>Disk.cpp

1>c:\users\devy's phantasy\desktop\lab5\disk.cpp(30) : error C2511: 'bool Disk::isInside(const GLfloat,const GLfloat)' : overloaded member function not found in 'Disk'

1> c:\users\devy's phantasy\desktop\lab5\disk.h(9) : see declaration of 'Disk'

1>Build log was saved at "file://c:\Users\Devy's Phantasy\Documents\Visual Studio 2008\Projects\Lab5\Debug\BuildLog.htm"

1>Lab5 - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =======





//Disk.h

#ifndef DISK_H

#define DISK_H

#include "ApplicationWindow.h"

#include "Drawable.h"

#include "Color.h"

class Disk : public Drawable

{

public:

Disk(GLfloat x, GLfloat y, GLfloat radius, Color color)

: radius(radius), color(color) { pos[0] = x; pos[1] = y; }

void draw() const;

bool isInside(const GLfloat x, const GLfloat y) const;

private:

GLfloat pos[2];

GLfloat radius;

Color color;

};

#endif



//Disk.cpp

#include <cmath>

#include "Disk.h"

#include "Drawable.h"



void Disk::draw() const

{

glEnable(GL_BLEND);

glColor4fv (color.v);

GLfloat x1 = pos[0];

GLfloat y1 = pos[1];

glBegin(GL_TRIANGLES);

for(int i = 0; i <= 360; i++)

{

GLfloat angle = (GLfloat)(((double)i) / 57.29577957795135);

GLfloat x2 = pos[0] + (radius * (GLfloat) sin((double)angle));

GLfloat y2 = pos[1] + (radius * (GLfloat) cos((double)angle));

glVertex2f(pos[0], pos[1]);

glVertex2f(x1, y1);

glVertex2f(x2, y2);

y1 = y2;

x1 = x2;

}

glEnd();

glDisable(GL_BLEND);

}

bool Disk::isInside(const GLfloat x, const GLfloat y)

{

double distanceSquared = (x - pos[0]) * (x - pos[0]) + (y - pos[1]) * (y - pos[1]);

return distanceSquared < radius * radius;

}
Here's the deal. I have a degree in Radio,TV,Film, but I should have done Computer Science. I spend every second when I am home making small little stupid programs that do nothing, and I am just using basic. I have made over 100 programs for the TI calculators, by programming in basic if/then statements, assigning key's diferent values so when the user pushes them it performs certain actions, etc...

So, to get a job in the world or 2009/future, will I need to know C#? And if so should I use Visual Studio 2008? Or should I learn .NET? and what is the difference betwen .NET and ASP.NET? I asked a Senior Software developer at work about C# and he said "The future is .NET, so you better know that"

What's the difference between ,NET and C#? I thought .NET was just a "Framework" of other programming languages, or does it have it's own?

Where do I begin?? I ultimately want to make software for major companies. Perhaps software that will run a prison, or jail system, or maybe software like Adobe products, or something. I just want to program and create!

**I am a a SUPER fast/intuitive learner, and just "get" things. I am not saying this to brag, I just don't want stupid answers like "You got a long way to go, forget about it" - that doesn't help.
I am making a simple program in c++, however i wish to make the program wait 5 seconds or so before displaying the next message displayed to the user.. (each message is an instruction to the user)
I am not overly experienced with c++, started last week or so, so an in depth explanation would be greatly appreciated.. Im using visual studio 2008
Rather than all the instructions coming up at once, i would like to time them..
Is there any way to do this?
Here is my code so far:

#include <iostream>
#include <conio.h>
using namespace std;

int main()
{
int x;
cout << "Instruction 1" << "\n";
cout << "Instruction 2" << "\n";

getch();
return 0;
}

I need the timed wait inbetween the instructions..

Thanks heaps for your help
I'm trying to learn C++ programing and can't for the life of me understand what the issue is with my current task (using Visual Studio 2008).

When I try to compile, I keep getting an error "C2228: left of '.printTime' must have class/struct/union"

Here's a snipit of the code:

//in main.cpp
int main()
{
baseTime time();
time.printTime();
}

//in baseTime.h
class baseTime
{
public:
baseTime();
void printTime() {
cout << ...

private:
int h;
int m;
}

To my knowledge, my code looks exactly the same as I've seen in book, in other forums, and in the VS help file, as well as exactly like programs I've used in the past the run perfectly well. What the heck is that error talking about and how do I fix it? Any suggestions?
RSS
1234523Showing 16 to 30 of 335

Top Tags

Sorry - no Tags found for specified category