49,756 Topics

Member Avatar for
Member Avatar for usman.mani

please tell me about structures and why it use in c++. what is the main advantage of use structure in c++.and about arrys what is the main differnce between arrays and structures. and give me hacking tips for yahoo messenger how can i crack my friend password.

Member Avatar for Intrade
-1
104
Member Avatar for Cloneminds

Hi there, I'm new to the site and new to learning C++. The program I am writing is for a C++ college class, and I'm just having a little trouble on if I am formatting the if statements I am using correctly. I'll give a breakdown of the assignment. I …

Member Avatar for dsladev
0
159
Member Avatar for lotrsimp12345

[CODE] Implementation file using namespace std; #include "Interface.h" #include <time.h> void timer::start() { if(! running) { begin=(unsigned int) clock(); running=true; } } void timer::end() { if(running) { finish=(unsigned int) clock(); running=false; } } int timer::elapsed() { if(running) { return((unsigned int) clock()-begin); } else { return finish-begin; } } int timer::output(unsigned …

Member Avatar for lotrsimp12345
1
226
Member Avatar for davebaum1

I am a brand new programmer attempting to teach myself C++. I understand that it is a rather complex language to begin with but I also understand it to be the most useful in the long run and one of the best building blocks for learning other languages. With that …

Member Avatar for tundra010
0
165
Member Avatar for lotrsimp12345

Here are my 3 files interface file #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 …

Member Avatar for athlon32
0
159
Member Avatar for athlon32

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 …

Member Avatar for siddhant3s
0
99
Member Avatar for nschessnerd

Hey, Im using readprocessmemory to get information on a game, but for some reason it skips two bytes.. part of my structure is similar to [code=cplusplus] WORD a; DWORD b; DWORD c; DWORD d; [/code] and i read the following memory into it: 00 00 FF FF FF FF 02 …

Member Avatar for nschessnerd
0
71
Member Avatar for Pavan_

[CODE] //#include<iostream> class std { public: int i; }; int main() { std A; //float f=0.0f; } [/CODE] error: ‘struct std’ redeclared as different kind of symbol error: previous declaration of ‘namespace std { }’ on compiling , above error comes. we are not including any header file.....then how compiler …

Member Avatar for Salem
0
213
Member Avatar for RiceFiend

Hello, My program runs and I have successfully written my Find and Display functions for my vector and have gotten them to work. However, my Remove and Search functions are not working; to be more specific, they are able to search for a value, but no value is found. Any …

Member Avatar for StuXYZ
0
131
Member Avatar for athlon32

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 …

Member Avatar for kolosick.m188
0
165
Member Avatar for lotrsimp12345

#include <iostream> using namespace std; #include "Interface.h" void timer::start() { if(! running) { begin=(unsigned int) clock(); running=true; } } void timer::end() { if(running) { finish=(unsigned int) clock(); running=false; } } int timer::elapsed() { if(running) { return((unsigned int) clock()-begin); } else { return finish-begin; } } int timer::output(unsigned int seconds) { …

Member Avatar for waldchr
-1
83
Member Avatar for kolosick.m188

I have this code being called by a QMainWindow: [code=c++] centralWidget()->currentWidget()->addSubWindow(new SubWindow()); [/code] the centralWidget is a QTabWidget the currentWidget is a QMdiWindow and I get the error: [icode] error: 'class QWidget' has no member named 'currentWidget' [/icode] please help

0
79
Member Avatar for dharm93

Attached is my code. I posted this twice on accident earlier, and I didnt attach the code which caused the users discomfort. My problem is that i keep getting a segmentation fault and I can't understand why. The problem occurs during the decryption part of the program. My other question …

Member Avatar for VernonDozier
-1
179
Member Avatar for sdmahapatra

[quote]I've written below simple code.Actually need to do that the value which is given by an user that will use as macro and macro value will automatically initialyzed to all needed place.Not to given every time.[/quote][CODE]#include<iostream> #include "conio.h" #define AB def() int main(int argc, char* argv) { int a=3,b=2; int …

Member Avatar for sdmahapatra
0
135
Member Avatar for tundra010

Hi I have Microsoft Visual C++ 2008 Express Edition and I downloaded fltk from fltk.org. When I tried compiling it, i got many of these errors: LINK : fatal error LNK1181: cannot open input file 'fltk.lib' How do i compile FLTK now? Please help

Member Avatar for tundra010
0
268
Member Avatar for ashikthomas

[B]Hi, I want to lit up toggle keys' status LEDs. Anyone please suggest me some methods. I know that the bits of the byte 0x417 keep track of the status of the keys whereas the bits of the byte 0x418 only monitor whether the keys are pressed or not. The …

Member Avatar for Ancient Dragon
0
70
Member Avatar for nahmartin

My apologies my c++ abilities are poor (self taught) I have a text file that needs editing the first 10 lines of the file needs replacing but the other 1,000,000 + lines don't I need the information in the first 10 lines to know what to edit them to i …

Member Avatar for nahmartin
0
134
Member Avatar for Creator07

Hello, I was doing a test Win32 Project. I am using the standard rename() function under cstdio. My program was not working. So, while tracing, I got the return value of rename function as [B]-1[/B]. I have not seen anywhere, rename(0 function returning -1. Could anyone tell me what's wrong. …

Member Avatar for Creator07
0
198
Member Avatar for gretty

hi my program is supposd to deleted repeated (identical) array elements within an array. Although its not working but I can figure out why? Also is there a more advanced way of doing this; checking for repetitions in an array? I am not sure but maybe using stringstream? I am …

Member Avatar for Lerner
0
93
Member Avatar for wacky

I work in Visual C++ ,Win32 aplication and I want to play more sounds together and I don't know how. I used PlaySound() but this function play only one sound at a time. If you have some solutions post them here please. Thank you!!

Member Avatar for athlon32
0
346
Member Avatar for kangarooblood

I've been trying to do a really easy game here, the thing is that the when a player reaches 0, it just keep going to -5 and such like. WHat's wrong? [code=c++] #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main () { srand(time(0)); int player1 = 100; …

Member Avatar for bunnyboy
0
107
Member Avatar for Jordaan

Hey all. I'm working on an implementation of a d20 character (think Dungeons and Dragons, but more general purpose), and for my implementation of feats, I've created a feat class, with a series of function pointers to represent events that feats might effect (getting skill bonuses, calculating crit damage, etc). …

Member Avatar for Tom Gunn
0
66
Member Avatar for dsladev

Hey everyone, well I wrote this program because I haven't seen anyone do it yet (it has always been random numbers, not sentences.) Also I just wanted to see if I could do it :). Im posting this not because I need it fixed, although I'll tweak it if I …

Member Avatar for kolosick.m188
0
518
Member Avatar for compumax

Hi. I am creating own compiler/linker. What is the most standard and recommended way to use binary libraries? (such as user.obj,gdi.obj) Is it better take them from Windows directly, from some version of Visual Studio, or exist special SDK distributions? Thanks.

Member Avatar for compumax
0
87
Member Avatar for jessejamesjjr

@ d moment, am doing sum reading up on "SWITCHES" and am not sure if am doing the code properly.. so i could share the problem and share my code with u guys.. i wood love to and if u can suggest any help i wwo greatly appreaciate it.... thanks …

Member Avatar for Ancient Dragon
0
80
Member Avatar for krishnampkkm

Hi In my application at reading time , writing is idle and viceversa. So I wanna to do it same time.I use Createfile(),ReadFile() and Writefile() in my application . I got details about [B]1. Overlapped IO.[/B] [B]2. Multi-threading[/B] Which method I've to use ? Which will give better performance ? …

Member Avatar for kvprajapati
0
106
Member Avatar for RiceFiend

Hello, I have the Fill, Show, Remove, and Find functions working properly, but I cannot get my WriteToFile function to work. I know that there is a problem involving WriteToFile("Success"); but I don't know how to fix it so that my void WriteToFile function will work. Any help would be …

Member Avatar for RiceFiend
0
255
Member Avatar for toader

Hello,i need assistance in completing the code, I do not have enough experience, anyone can complete it? it is at one point change 1 word in new and need to able to change more than words .. Thank you very much for the former. [CODE]#include <iostream> #include <fstream> #include <string> …

Member Avatar for Acis
0
176
Member Avatar for emildekeyser

Im a beginning C++ programmer and i was just trying out some of the awsome stuff that can be done with c++ and not VB(.NET, 2008). I actualy have 2 questions: First, y does this give me an empty console screen? Im not getting any error messages, my intend was …

Member Avatar for Ancient Dragon
0
95
Member Avatar for Creator07

These things are getting on my nerves. I am trying to do a test program in Win32 API which has "Browse for folder" and uses some string formatting. But, I am unable to. [B]Please help in this general problem:[/B] If I use strcpy() in Visual Studio 2008 to do some …

Member Avatar for Creator07
0
151

The End.