I am a college student getting my Computer Science degree. A lot of my fellow students really haven't done a lot of programming. They've done their class assignments, but let's be honest here those questions don't really teach you how to program.
I have had several other students ask me questions about how to parse things, and I'm n...
I'm having the following classes:
class Base
{
public virtual void Print()
{
Console.WriteLine("Base");
}
}
class Der1 : Base
{
public new virtual void Print()
{
Console.WriteLine("Der1");
}
}
class Der2 : Der1
{
public override void Print()
{
Console.WriteLine("Der2");
}
}
...
Hello.
I'm more of a SU and SF but now I'm after some help from the SO community.
I'm dabbling in a bit of php coding with databases and am getting a bit stuck with relationships and the like. Can anybody reccomend some books, online or real, that would be a good start for someone new(ish) to php and mysql databases?
Cheers!
...
Possible Duplicate:
Use the keyword class as a variable name in C++
In a C header file of a library I'm using one of the variables is named 'new'. Unfortunately, I'm using this library in a C++ project and the occurence of 'new' as a variable names freaks out the compiler. I'm already using extern "C" { #include<...> }, but th...
This is a bit unclear to me... So, i if i have a function:
char *test(int ran){
char *ret = new char[ran];
// process...
return ret;
}
and then call it multiple times:
for(int i = 0; i < 100000000; i++){
char *str = test(rand()%10000000+10000000);
// process...
// delete[] str; // do i have to delete it here?
}
...
Okay the previous question was answered clearly, but i found out another problem.
What if i do:
char *test(int ran){
char *ret = new char[ran];
// process...
return ret;
}
And then run it:
for(int i = 0; i < 100000000; i++){
string str = test(rand()%10000000+10000000);
// process...
// no need to delete...
as I said,i've loosely applied HTML in some instances, but i'm looking for a more techy, but easy to learn language.Can anyone help?
...
As an example say I have a class foo that does not have a default constructor but one that looks like this
foo:foo(int _varA,int _varB)
{
m_VarA = _varA;
m_VarB = _varB;
}
How would I allocate an array of these.
I seem to remember trying somthing like this unsuccessfully.
foo* MyArray = new foo[100](25,14).
I don't think thi...
When I go to make a new C# Windows application in VS 2010, there is an option at the bottom right area with a check box saying add to source.
I want to know what happens, if I check it and create the new C# file.
...
Are there best practices out there for loading data into a database, to be used with a new installation of an application? For example, for application foo to run, it needs some basic data before it can even be started. I've used a couple options in the past:
TSQL for every row that needs to be preloaded:
IF NOT EXISTS (SELECT * FROM M...
I've got a little experience with Python (enough to where I can do if/else/elif and some random number generation), but I've always had a weird fascination with the Lisp languages. I downloaded some scheme source code to look at the syntax but it was pretty much gibberish to me.
For a programmer with only a little programming experience...
Ok, i won't go into the full details (too much to explain) but here is what i am trying to do. I have a button on a webpage (we'll call page-1) that links to a page (we'll call it page-2). This page opens in the same window. However, i need the page (page-2) that opens to open up a new window with another page (we'll call this one pag...
I found this website some times ago. They are proposing much innovations in scripting, but I feel like something is missing. Had anyone tried it out already?
...
I am confused as to why the new operator isn't working as I expected it to.
Note: All classes below are defined in the same namespace, and in the same file.
This class allows you to prefix any content written to the console with some provided text.
public class ConsoleWriter
{
private string prefix;
public ConsoleWriter(strin...
My developement environment is [Windows 7; visual studio 2010; x86].
I have a dll that was built for server 2003 long time back. When I use it in my project and follow new/delete sequence to use a class, application crashes during delete call. I verified the same even without any other call between new and delete. When I replace new/del...
So here's the deal:
I have a concrete class Window, representing an operating system window which will be be used for drawing. Window can take on many types, such as fullscreen, fixed window, resizable window, borderless window etc. This is implemented using an interface IWindowType, in which the specific types derive from (classes are ...
In JavaScript, what's the difference between
var x = Object();
and
var x = new Object();
?
...
Hi,
SDL provides me this struct:
typedef struct SDL_Rect {
Sint16 x, y;
Uint16 w, h;
} SDL_Rect;
I want to create a new SDL_Rect on the heap as class variable:
// Forward declaration
private:
SDL_Rect *m_pcScreenRect;
And in the constructor I do this:
/* Screen Rectangle (for clearing) */
m_pcScreenRect = new SDL_Rect...
Hi Guys,
Just rounding up what features should be made available for the next release of ASP.net MVC 3.
There is no news on the next version. But I really want opinion for people using ASP.net MVC to make feature judgments.
As for starters I would like following features to be included
Support of Visual Designers. Currently HTMl helper...