66 Posted Topics
Re: 1. You need to Post like this: [code=C]#ifndef INTERFACE_H_INCLUDED #define INTERFACE_H_INCLUDED #include <time.h> class timer { public: void start(); void end(); int elapsed(); int subtract(); int add(); int output(unsigned int seconds); private: bool running; int begin; int finish; }; #endif // INTERFACE_H_INCLUDED implementation file using namespace std; #include "Interface.h" #include … | |
I'm have a small confusion, and i need a little clarification; when you make something on the heap, like this: [code=C++]int *somePointer = NULL; somePointer = new int;[/code] an int is created on the heap right? This would be the equivalent of doing something like...: [code=C++]int x;[/code] ...directly on the … | |
I'm following a tutorial on Win32, and as I compile the examples, I'm also kinda messing with the code to experiment with different concepts. Here is a little ditty i worked with: main.cpp [code=C]#include <windows.h> #include <iostream> #include "prototypes.h" #include "defines.h" LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); void AddMenus(HWND); int … | |
Re: The wavemix DLL is a utility that allows multiple wav files to be played simultaneously. It is designed to be as simple to use as possilbe but still have the power to do what is required by games. The DLL supports 8 channels of simultaneous wave play, the ability to … | |
Re: [url]http://www.google.com/#hl=en&q=custom+icons+jfilechooser&aq=&oq=&aqi=&aq=&oq=&aqi=&aq=f&oq=custom+icons+jfilechooser&aqi=&fp=JJ2lHziMUzc[/url] Hope I helped :) | |
Re: Working with the Registry in C++: [url]http://www.developer.com/net/cplus/article.php/3449721[/url] | |
Re: Your code should be: [code=C]#include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { MessageBox(NULL, "Hello World!", "TEST", MB_ICONEXCLAMATION | MB_OK); return 0; } [/code] Your problem was on lines 8, and 9 :) | |
Re: This shows how to make a new project: [url]http://www.google.com/url?sa=t&source=web&ct=res&cd=3&url=http%3A%2F%2Felvis.rowan.edu%2F%257Ekay%2Fcpp%2Fvc6_tutorial%2Fnew_project.pdf&ei=OYo-SqjoMIv0sgOM8Zz7Cg&rct=j&q=make+a+new+project+VC%2B%2B&usg=AFQjCNGFnx3EUzbSDxX7DaV6QSN3UDuHFQ[/url] | |
When printing output to a terminal in C++, should i use "\n", or "endl"??? Is one lighter, faster, or industry standard? | |
Re: [url]http://www.google.com/#hl=en&q=detect+com+events+C%2B%2B&aq=f&oq=&aqi=&fp=leBsIIJAIN0[/url] Any Help? It might help to add a little more detail to your post :) | |
Re: [QUOTE=chaines51;893399]I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from … | |
This is my code that I'm using: [code=C]void create_project_go() { FILE *fp; FILE *fopen("/usr/lib/htmlexamples/default.html", "r"); };[/code] and i get this error: [code]/home/miguel/Documents/packing/create_project.c||In function ‘create_project_go’:| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|39|warning: unused variable ‘fp’| /home/miguel/Documents/packing/create_project.c||In function ‘get_project_info’:| /home/miguel/Documents/packing/create_project.c|46|warning: … | |
Hello All, I'm compiling my program, and i keep getting this error: [code]obj/Debug/fubar.o||In function `fubar::fubarl(int*, int*)':| /home/miguel/Documents/pointersandref/fubar.cpp|7|multiple definition of `fubar::fubarl(int*, int*)'| obj/Debug/fubar.o:/home/miguel/Documents/pointersandref/fubar.cpp|7|first defined here| ||=== Build finished: 2 errors, 0 warnings ===| [/code] This is my complete source code fubar.cpp [code=C] #include <string.h> #include <stdio.h> #include "fubar.h" void fubar::fubarl(int *foo, … | |
Re: Great Coding man! it's very easy read and follow :) | |
Ok...i've been getting a weird error in Gtk+. I've narrowed it down to this line: [code]gtk_menu_shell_append(GTK_MENU_SHELL(helpmenu5), about);[/code] that gives me this error: [code](packing:5236): Gtk-CRITICAL **: gtk_menu_shell_insert: assertion `GTK_IS_MENU_SHELL (menu_shell)' failed [/code] Now my program compiles, however the menu wont pop up and the terminal prints that error...does anyone know what … | |
I don't know if this is the right place to post this but here goes nothing. I know this is such a cliche from us C++ coders, but I wanna make my own open source OS. I would use something like BSD or Linux, but I really wanna use C++ … |
The End.