51,593 Topics

Member Avatar for
Member Avatar for FTProtocol

im just wondering how you use send() and recv() like: [code=cpp] bool blah() { if(recv(send("10.1.1.1", "HI"), szBuffer, sizeof(szBuffer)) { MessageBox(NULL, "WORKED", "??", MB_OK); return true; } else { MessageBox(NULL, "FAIL", "??", MB_OK); return false; } } [/code] i know that wouldnt compile but you get the point?

Member Avatar for FTProtocol
0
167
Member Avatar for boradbhavesh

I got following algorithm for finding permutation but I can't code it. Can any one can code this permutation algorithm in c++ using recursive method as below [I]bool nextPermutation(int array[])[/I] 1. The first permutation is the permutation represented by the sequence (1, 2, …, n). 2. The last permutation is …

Member Avatar for Salem
0
88
Member Avatar for afiq200990

Hey guys. Question is. I need an example of a working code for a multiset. Hope theres someone out there who can help me on this, kind soul. Probably a multiset with a set of a grocery lists; not numbers you know.. for eg... {eggs, tomatoes, onions, chicken, shampoo..etc} you …

Member Avatar for Undertech
0
135
Member Avatar for how1121

This program does not have any input. Instead, the main routine, called the driver, calls the Pay function, testing it with a variety of parameters. Your job is to write the function. It should calculate the rate of pay, but in this case, the function returns the amount of pay …

Member Avatar for ithelp
0
117
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
245
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
132
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
139
Member Avatar for Karil

Hi Guys I just started learning some C# Coding and i was wondering how i would make an interface for a C# program. If this is a dumb question please dont be too cruel to me.

Member Avatar for natpu
0
143
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
331
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
214
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
190
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
176
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
56
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
157
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
181
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
97
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
268
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
122
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
110
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
133
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
194
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
124
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
150
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
191
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
145
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
99
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
109
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
66
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
127
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
387
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
135
Member Avatar for coolkeg

hi guys, I'm new to C language and am currently using an online tutorial, ive been doing prety well on my own until now. Basicly the problem is with the "while" command, when i copy and paste the code im working with from the tutorial site into a word pad …

Member Avatar for Aia
0
138
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
255
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
104
Member Avatar for Cosa

I am having trouble reading in data from a file. The data file store the information of albums and its respective track info eg 1234 //this is id number Scarlets Walk //album name Tori Amos //artist 24 //price 2 //stock Pop //genre Track A //track name 10 30 //track length …

Member Avatar for Cosa
0
122
Member Avatar for rikkie

Hi guys, I've been searching for a C++ compiler for my Xda Exec, running Windows Mobile v5. It looks like CEdit will do the job (unfortunately not free) but then I have to download the compiler from a "third party" I'd be grateful to hear from people who are using …

Member Avatar for Ancient Dragon
0
50
Member Avatar for coderoobie

Hi happy people I've bin trying to sort items in a list box, the problem is obviously: It doesn't work Please, any modifications to the code below is fully and unconditionally allowed. [code=C++] void __fastcall TForm1::btnSortClick(TObject *Sender) { //sort ascending if (rdAscending->Checked){ bool swopped = true; int iEnd; int arr …

Member Avatar for coderoobie
0
170
Member Avatar for STUDENT#101

so this is what I have done [code] #include<iostream> #include<string> void menu(); using namespace std; char choice; void digcom (); void matrices (); int main () { menu(); return 0; } void menu() { cout<<"\tMENU" <<endl<<"MATHEMATICS(matrices select A)\n"<<"DIGITAL COMMS select B\n"<<"c TO EXIT"<<endl; cin>>choice; while(choice!='c') { switch(choice) { case ('A') …

Member Avatar for mitrmkar
0
170
Member Avatar for STUDENT#101

hi they is this program that I have created and the problem now is that I need it to be infinate unil he user enters the letter c. I hafe created a while loop then made the variable which stores this choice global after each function has ran i then …

Member Avatar for Narf!!!
0
100
Member Avatar for vanhai

it's the link in the web site [URL="http://www.vietnamfuntravel.com"]example[/URL] has one sub page as : [URL="http://www.vietnamfuntravel.com/hotels.php"]subpage[/URL] .when we click on button book now . how to get the link : [URL="http://www.vietnamfuntravel.com/book_tour.php?tour=49&title=Phan%20Thiet%20%20Mui%20Ne%20(02%20days%20%2001%20night)"]follow[/URL] in to code for new mail ???

Member Avatar for iamthwee
0
93
Member Avatar for The Buzzer

hi there I want to give a for loop in my programm that if any student fails in more than four subject he will not be able to go to the next level. if average is less than 40 then the student will be failed . i tried in many …

Member Avatar for Clockowl
0
91
Member Avatar for The Buzzer

hello coders, I am facing problem to filing my programm. it opens the intended file but problem is it is not saving any datas. I want to see the results in notepad or word. I am using windows vista and my soft is dev C++. I dont want to use …

Member Avatar for mitrmkar
0
144
Member Avatar for Narf!!!

Good morning, good afternoon and good evenings (to cover almost all posibilities) The error message is as follows in DEV-C++ compiler [QUOTE] Compiler: Default compiler Building Makefile: "I:\cpp\Makefile.win" Executing make... make.exe -f "I:\cpp\Makefile.win" all g++.exe include/Test.o include/Objeto.o include/ConjuntoBase.o include/IteradorBase.o include/ConjVector.o -o "TestEstructurasDiscretas.exe" -L"C:/Dev-Cpp/lib" include/ConjVector.o(.text+0x45):ConjVector.cpp: undefined reference to `vtable for ConjVector' …

Member Avatar for Narf!!!
0
94
Member Avatar for daviddoria

I have a very simple class [code] class Point { public: Point(); Point(double x, double y); double x_; double y_; } [/code] the problem is, I can't assign my class to another instance, ie: [code] Point A(2,4); Point B(); B = A; [/code] It says the lvalue must be modifiable. …

Member Avatar for Narf!!!
0
213
Member Avatar for Wiki_Tiki

Hi everyone, I'm busy working on a word processor in Visual C++ 2008 and I need some help with a Print option, and a Page Setup option. What I'm trying to do is print the contents of a RichTextBox control (txtdisplay), and can't find any way to get it to …

Member Avatar for mitrmkar
0
271
Member Avatar for jonabie

im a highschool student and i really need help bout this.... how can i make a program that will enter my name and display it automatically.....

Member Avatar for jonabie
0
73
Member Avatar for sanbal

I am creating a msi file in windows installer. When the msi is executed, it register some dlls in the registry. I renamed a dll in the code and i manually want to rename the dll in the registry. How can i do this Thanks in advance

Member Avatar for Ramy Mahrous
0
103
Member Avatar for THAPELO

Suppose we have to write a program where a mark out of 60 is entered and then the corresponding symbol has to be displayed. A message indicating whether the person has passed or not, should also be displayed. We decide to write the program in three steps. You should submit …

Member Avatar for Narf!!!
0
104

The End.