49,760 Topics

Member Avatar for
Member Avatar for itzaaron

I am new to c++ and I'm kinda struggling. I'm trying to write a program to guess a number that the user inputs. The program should guess a number then the user should be prompted if it is too high or too low. then the program should guess again, intill …

Member Avatar for mrnutty
0
1K
Member Avatar for somename

Hi there, i am trying to implement thread injection from my windows forms .NET project. Here is the code which works just fine from simple console app or Gtk+ gui application, but unfortunately not from .NET gui app. [CODE]#define NtCurrentThread() ((HANDLE) -2) #define NtCurrentProcess() ((HANDLE) -1) typedef DWORD (WINAPI *Rm_MessageBoxA)(HWND …

0
128
Member Avatar for dumrat

I am using multiple threads that are doing work. I need the threads to update an integer once they finish processing. [CODE] //Lock i_Flag++; //Unlock [/CODE] Then [CODE] if(i_Flag == i_ThreadCount) //Do something. [/CODE] My question is whether I need to use locks around i_Flag++ because it is a simple …

Member Avatar for jyh5
0
129
Member Avatar for patroclus

Hello, I'm trying to do something like this: - There're Base class and Derived classes. - Some Derived classes use multiple inheritance, from Base class and a pure virtual class called Interface. These classes are able of some functionality that ordinary Derived classes aren't. Why doesn't it work to cast …

Member Avatar for patroclus
0
85
Member Avatar for atch

Hi, I've got construction of namespaces like this: namespace one { namespace two { class SomeClass{...}; } } and when I try to use this class (without fully qualified name) in another file (also with nested namespaces) I'm getting errors. It doesn't even help if I place declaration of using …

Member Avatar for atch
0
83
Member Avatar for Thew

Hello, I'd like to make some application which will play videos or flash animations over the desktop. The only idea I have is to use DirectShow, make application window transparent and "always on top". But this is not exactly what I want. I'd like to have something playing on the …

0
161
Member Avatar for Vitriolics

I thought i had complex declarations nailed, as in i could tell you what a pointer to an array of functions that returned int and took doubles as arguments looked like i find this little horror: [CODE] /Return the IP address of a domain name DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*); …

Member Avatar for Vitriolics
0
208
Member Avatar for redreed

when i use random my settextstyle starts malfunctioning eg if i choose Gothic style i gives plain text if i make randomize a comment it works without bugs can anyone help me and also i heard void main is wrong and int main is correct why??

Member Avatar for redreed
0
104
Member Avatar for herms14

Guys...I badly need your help...I made a Hangman game and the requirement is it mus be a two player game so I need to make use of socket programming. The problem is I don't know what to do next..I do not know how to do the read and write the …

0
61
Member Avatar for vishalkhialani

Hi, I am using Borland c++ builder 2009 and I want to make a graphical application for my project. I need a book that can teach me that. I searched the net but I always found book on version 5 which is over 10 years old. Does anyone know any …

Member Avatar for shaynerossum
0
121
Member Avatar for shaynerossum

Hi, first of all I would like to thank you for taking the time to look at my problem. I'm trying to input to a multidimensional character array. The error occurs on the second array. I tried to understand the problem by varying my input, but it always occurs on …

Member Avatar for shaynerossum
0
328
Member Avatar for artorius

This is my problem...hopefully somebody can help me out with this. This is what I am supposed to be doing: Recursive Binary Search of 2-dimensional array: Load a 30x20 two-dimensional array of ints with values from the file “values.txt”. The file contains 900 numbers in order. Once the array is …

Member Avatar for artorius
0
2K
Member Avatar for shindu

so... i have been looking at this for a good 20 minutes and it makes no sense. when i compile this simple linked list implementation, it gves me this compile error. obj\Debug\Projects\LinkedList\LinkedList.o||In function `_ZN4nodeC1Ev':| obj\Debug\Projects\LinkedList\node.o:C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\locale_facets.tcc|2497|first defined here| ||=== Build finished: 1 errors, 0 warnings ===| any ideas what …

Member Avatar for shindu
0
48
Member Avatar for sfrider0

I'm pretty new to opengl but been using c++ for a while now. How can I display variables using this? I can display single characters by using [code] glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN,'0'); [/code] Why can I not use [code] int x = 0; glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN,x); [/code] Compiles but won't display anything.

Member Avatar for sfrider0
0
158
Member Avatar for NathanOliver

hi all. I'm not sure if its possible but can you call a different constructor inside a constructor of a object? ie can i have different constructors call a single constructor to set up the object [code=c++] class foo { public: foo(int) foo(double) //... }; foo::foo(int number) { this = …

Member Avatar for mrnutty
0
118
Member Avatar for evilguyme

is there a way to get the pixel color that is under the mouse? i heard of ways where i can turn it into bmp's a.. but even then i can't get the color of the pixel under mouse.. D: i just need a thing to make it get the …

Member Avatar for William Hemsworth
0
136
Member Avatar for argio

Access violation (Segmentation fault) raised in your program. I received this error when I ran my program after compiling it. I can't find the error in my code. main.cpp [CODE=c]/* Main.cpp source file. Main module. Copyright 2009 (GNU CC Licence) Madcow Deity Productions */ #include <cstdlib> #include <iostream> #include "System.hpp" …

Member Avatar for StuXYZ
0
109
Member Avatar for NinjaLink

Hi, I have two seperate programs below writing a short program for each. My programs run, but sometimes when I rearrange things in my program to try to get it to work, I will receive an error. I am tried to figure it out since last night, but I am …

Member Avatar for verence
0
3K
Member Avatar for aladar04

I can't reverse the inputted word... Here is my code... Please correct it... Sample Output: Type word(s): hello The reverse is: 'olleh' [CODE=c]#include <stdio.h> #include <conio.h> #include <iostream.h> #include <ctype.h> #include <stdlib.h> #include <string.h> char orig [300]; char rev [300]; int len; void original () { cout << "\n\n\tType word(s): …

Member Avatar for aladar04
0
151
Member Avatar for salman1354

Hello all, I have a question on using ArrayList class. Basically, I have a class called Customer as follows: class Customer { int ident; float value; float newValue; public: void setIdent( int ); int getIdent() const; void setValue( float ); float getValue() const; void setNewValue( float ); float getNewValue() const; …

0
67
Member Avatar for chandagondhali
Member Avatar for blackdove

I'm new to recursion and object oriented programming, but we have been assigned the knight's tour problem. This is where the knight's piece has to travel to every space on a chess board and land on each spot only once. I pretty much have my program done, except i'm having …

Member Avatar for RehabReda
0
2K
Member Avatar for jdam7459

I am having problems with traversing a parce tree. I need to do an in order traversal recursively. Here's the class's private section... [CODE] template <class data> class BinaryTree { private: struct tNode { data info; tNode *left; tNode *right; }; tNode *root; public: }; [/CODE] I'll be calling inOrderTraversal() …

Member Avatar for jdam7459
0
98
Member Avatar for Hawkpath

So heres the problem. My Grandmother needs to look up stocks, but she has trouble using "FoxFire" to look it up. I need a way where she can enter the name of the stock she wants, and the program enters it into a google search and searches for the stock. …

0
74
Member Avatar for adi.shoukat

Bellow is the piece of code that causes Segmentation Fault: (in Linux Segmentation Fault is usually due to illegal memory access) else if(intData==3) { FILE *fp; int ch; if((fp = fopen("file.txt","rb"))==NULL) { printf("Cannot open Source file.\n"); exit(1); } while((ch = (int)fgetc( fp )) != EOF) { printf("%s",(char*)ch); send(client, (char*)ch, 1,0); …

Member Avatar for Cosmin871
-1
89
Member Avatar for MrMoogles

Hey! Im new to this C++ stuff and the first major problem I run into is a two dimensional array. I have to declare the array and store data values from ANOTHER data file. I have some of the code written down. Please help and tell me what I'm doing …

Member Avatar for necrolin
0
759
Member Avatar for sachin.h

Hello Everyone, I am presently working on VC++ project, i have to create a new airgauge component using activex, [COLOR="Green"][B][U]can you please let me know if there is any better tool for creating a activex component, and i would also like to know if there are any good books on …

0
39
Member Avatar for gcardonav

Hi: I am trying to create a loop for a code. My loop is supposed to find all the combinations using the numbers 1 and 0 depending on the length of my string. For example if I set up my string to be 3 then the program should give me: …

Member Avatar for dkalita
0
184
Member Avatar for dkalita

Hi Can anyone help me in extracting all the tables and its contents that are present in a MS word document using c++ or C

Member Avatar for dkalita
-1
114
Member Avatar for aomran

this progran will simulate a process queue, giving time slices based on the priority. The process entries will be in a file, one per line.the data is the start time, priority level, total time to run and process name. when I run the program I got few problem 1. how …

Member Avatar for aomran
0
121

The End.