49,761 Topics
| |
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 = … | |
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 … | |
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... | |
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 | |
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 … | |
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? | |
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 … | |
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.. … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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* … | |
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 … | |
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 ( … | |
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 | |
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 … | |
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 … | |
[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) … | |
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 | |
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 … | |
is it possible to use the Dev-C++ compiler with Netbeans? if so how, i can't find anything that explains it. | |
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 … | |
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 … | |
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 … | |
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 … |
The End.