- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
[CODE]using System; using System.Collections.Generic; using System.Text; class BaseClass { public virtual void method() { Console.WriteLine("BaseClass method"); } } class SubClass : BaseClass { public override void method() { Console.WriteLine("SubClass method"); } public void someMethod() { Console.WriteLine(); } static void Main(string[] args) { BaseClass var = new SubClass(); var.method(); var.someMethod(); } … | |
[CODE]using System; using System.Collections.Generic; using System.Text; class BaseClass { public virtual void method() { Console.WriteLine("BaseClass method"); } } class SubClass : BaseClass { public override void method() { Console.WriteLine("SubClass method"); } public void someMethod() { Console.WriteLine(); } static void Main(string[] args) { BaseClass var = new SubClass(); var.method(); var.someMethod(); } … | |
I need to get the current time from Internet using C language. Any help is appreciated, hopefully a source code sample. Thank you in advance. | |
Re: You may need to set the buffer ptr to null: [CODE]memset(ptr, 0, sizeof(your structure));[/CODE] | |
Re: There is no such term 'procedure' in C language, only function. In some languages such as visual basic there are procedures and functions and the difference is that functions return values and procedures don't. | |
Re: Why not declare user temp; (no pointer) and change the references of the pointer -> to . as: user temp; ... &(tmp.array[i]) | |
The following program compiles (using MS Visual Studio 2010) with no errors or warnings and runs without any error, why? Thanks in advance for explanation. [CODE]#include <stdio.h> int f[3] = { 1,2,3 }; int g[4] = { 12,45,55,65 }; int main(int argc, char *argv[]) { printf("%d\n", f[5]); return 0; } … | |
Does anybody know how member of function can be a pointer to a function. The following example crashes when I call the member that is pointing to a function. [code]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> typedef long fooPtr(char *); typedef struct { fooPtr *func; long cnt; } MyStruct; … |
The End.