49,761 Topics

Member Avatar for
Member Avatar for CoolGamer48

Hey I'm writing a color class, and I want to have a constructor that can take in an unsigned int like 0x00FF00FF and interpret it as fully opaque green. I have code for that (I think it should work, could someone check it?): [CODE] rzb::color::color(unsigned int hex) { m_red = …

Member Avatar for ArkM
0
228
Member Avatar for Labombadog

Hi, I normally post at the IGN boards for games, but recently I semi-quited games(school reasons) and thought of getting serious with C++ because I want to become a game designer in the future. I know its going to take a lot of hard work and time but I know …

Member Avatar for mahlerfive
0
128
Member Avatar for omdnaik

Hii there Can ne tell me how to compile and run a C prog. using microsoft VC++... Till now i have been using Turbo C++ Compiler...

Member Avatar for Ancient Dragon
0
135
Member Avatar for scream2ice

hey all; is there a conversion from "char" to "int" or to "double" possible ? If yes, how? and if not, how do we work with numbers that have more than 32 digits, for instance a 500 digit number? thanks

Member Avatar for invisal
0
328
Member Avatar for jazu100

I have to send bitmap and do something like this: Client: [code] HBITMAP bmp = LoadBitmap(0,MAKEINTRESOURCE(1)); send(socket,(char*)&bmp,sizeof(HBITMAP),0); [/code] Server: [code] HBITMAP bmp; recv(socket,(char*)&bmp,sizeof(HBITMAP),0); [/code] But this won't work and I know it... so I have to use e.g. GetDIBits and SetDIBits. But how? Please don't give any example links, they …

Member Avatar for jazu100
0
213
Member Avatar for conan19870619

what is the easist way find out the number of lines in a txt file? there seems to be a function to ignore rest of the line...will that help?

Member Avatar for Radical Edward
0
188
Member Avatar for Wiki_Tiki

Hi everyone, I've been working on a word processor called 'Pen and Paper', and I need some help with the Find/Replace Dialogs. I'm using Visual C++ 2008 Express, and I have a Richtextbox control (txtdisplay) including a main menu. I've finished making everything such as save/open, New Document, but I …

Member Avatar for William Hemsworth
0
169
Member Avatar for mhil_joy

i have been given an assignment about palindromes but i don't no how to do the coding in c++ and using queue and stact to check if a string is a palindrome.. please help me guys.. i need all your knowledge about it!.. i need it as soon as possible.. …

Member Avatar for WaltP
0
53
Member Avatar for coveredinflies

Hi, I am sure you have all seen the recursive factorial program. [code] int factorial(int number) { int temp; if(number <= 1) return 1; temp = number * factorial(number - 1); return temp; } [/code] " Once at 1, the values are returned to the previous factorial call and multiplied …

Member Avatar for coveredinflies
0
149
Member Avatar for dmanw100

Is there an easy way to convert from Char* to int? I have tried converting as such: [CODE]char* value_a; int* temp = value_a; int final = temp;[/CODE] The compiler is returning an error so I know something is wrong but why can't I convert this way? Any suggestions as to …

Member Avatar for ArkM
0
177
Member Avatar for phillipeharris

I am trying to write the class that will take in objs from another class and put it into a circular array without using the STL. O I wrote the class and in Main I delcared an obj of the queue called (myQueue myQ) so this is the obj but …

Member Avatar for phillipeharris
0
94
Member Avatar for BradenMurphy

[CODE] string hello; cin>>hello; sprintf(buf, "This server has been contacted time%s\n", hello); [/CODE] I'm making a simple client-server program. I just want to know how do I get to print out the hello string inside the sprintf() >.< soz might be a very dumb question.... The error i keep getting …

Member Avatar for BradenMurphy
0
247
Member Avatar for mysterio

Question:-- Write a program that read a line of text, changes each uppercase letter to lowercase and places each letter both in a queue and onto a stack. The program should then verify whether the line of text is a palindrome Output: Please enter a line of text I am …

Member Avatar for mhil_joy
0
3K
Member Avatar for dmanw100

I have a problem that seems like it should be easy but so far has been fairly difficult to find documentation on... I want to be able to pass parameters to a program in the command line in the same manner as the built in functions (ex. the "/r" in …

Member Avatar for Prabakar
0
117
Member Avatar for krebstar

Hi.. I have a question regarding the configuration manager.. Why is it that the samples on the MSDN Learning center cannot be compiled using the default settings? With Itanium as the active solution platform by default, the compiling gets skipped.. However, when I change this to Win32, it compiles.. Isn't …

Member Avatar for krebstar
0
108
Member Avatar for sym

I read that STL containers will allocate elements in the heap but the container objects are allocated in the stack. Therefore, in the code below do I need to first clear off the elements of vector "vec" from the heap before deleting "sub" in order to avoid memory leak? Or, …

Member Avatar for sarehu
0
127
Member Avatar for HyperEngineer

I'm trying to read a com port. I can create it, change the dcb, set the timeouts and see the input buffer using ClearCommError. But I can not read it. When the program hits the ReadFile() statement it never comes back. Here is some of the code: [ICODE] char CMyClass::EIA232_Open(HANDLE* …

Member Avatar for Ancient Dragon
0
190
Member Avatar for verone

this is wat i hav been doing but its not workin.i am not able to write the code for searching #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<string.h> //***Record structure declaration*** struct Details { char name[30]; char sex; char status; char title; char address[40]; char qualification[10]; char experience[20]; int telephoneno; int membershipno; int …

Member Avatar for Lerner
0
120
Member Avatar for Prm753

Hi all, I am trying to optimize one of my applications by cutting down on the number of function calls I am making. I have decided to do this by reading definitions out of a file and using them as the argument for the function. [code] char registryHive[MAX_PATH]; ZeroMemory ( …

Member Avatar for ArkM
0
149
Member Avatar for veeran

in VC++ 2005 I tried to create directory using CreateDirectory(_T("c:\program files\Testing")) But it is not created in c:\program files\ it is created in loged in Users appdata folder how can i overide this senario in vista (windows folder and System directory) please give any link or information

Member Avatar for William Hemsworth
0
187
Member Avatar for disturbedfan

Ok so ive strted to try and teach myself C++ cause in a few years when i go to college i wanna study computer science or engineering. I downloaded Dev C+++ and followed some small simple tuts on how to do C++. 2 of the tuts started off simple and …

Member Avatar for gregorynoob
0
143
Member Avatar for daviddoria

I want to be able to do this: Pass a parameter to my main program like "parallel = yes" and then many functions down in the hierarchy (ie main calls "Function1" which calls "Function2" which calls "Function3", etc) I need to see the value of "parallel". I'd hate to have …

Member Avatar for Radical Edward
0
97
Member Avatar for disturbedfan

[code] #include <cstdlib> #include <iostream> #include <string> using namespace std; string name = ""; int main(int argc, char *argv[]) { cout << "Hi, whats your name? "; cin>>name cout << end1<< "Well Hello " << name.c_str() << "Please provide me two numbers on 2 seperate lines "; cin>>number1; cin>>number2; cout(number1+number2) …

Member Avatar for Radical Edward
0
105
Member Avatar for The Buzzer

hi guys, hi bosses, I am in real trouble. I have to finish my program by tonight, look out to my threads and give me a solution pls. I will be greatful to those who will give me a quick reply. Cheers

Member Avatar for The Buzzer
0
64
Member Avatar for gispe

hi ppl, im havin a problem with declaration of functions, its givin me errors on the functions i made. [code=cplusplus] // empleados.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using std::basic_iostream; char menu (char); void ingresar_legajo_hijos (int &, int &); void ingresar_horasTrabajadas_valorHora (int …

Member Avatar for gispe
0
126
Member Avatar for sciwizeh

is it possible to use the Dev-C++ compiler with Netbeans? if so how, i can't find anything that explains it.

Member Avatar for sciwizeh
1
382
Member Avatar for kinger29

I have two files sampleclass.cpp and sampledataclass.cpp along with sampleclass.h and sampledataclass.h In sampleclass.cpp in the constructor I give a value to a variable [B][U]sampleclass.cpp[/U][/B] sampleclass:sampleclass(){ x = "some string value"; } In sampleclass.h I create x and an instance of the data class [B][U]sampleclass.h[/U][/B] CString x; sampledataclass myDC; Now …

Member Avatar for ArkM
0
133
Member Avatar for driplet

I need to read a txt file as data input. The format of the txt data is: ... x x C C x x C x x C C C ... where x represent numeric value, C is charater, and the same format repeated many times, but may change to …

Member Avatar for Lerner
0
88
Member Avatar for kungfoo

The Task The range R(v0, a) of a projectile fired with initial velocity v0 at an angle a is given by: Your task in this test is to write a function to calculate the range, then to produce a table of ranges for prescribed values of velocity v0 at an …

Member Avatar for VernonDozier
0
252
Member Avatar for gregorynoob

the problem is to find the minimum numbers to be popped from an array to make it sorted. so for example 12534756, you can pop all but one, but it's best to pop 5 and 7 cause it's the least needed to make it sorted. I'm having difficulties finding a …

Member Avatar for ArkM
0
102

The End.