51,592 Topics

Member Avatar for
Member Avatar for melmakrani

I want to write a program in C++ that automatically opens telnet with an IP-adress too connect to a server, and read and write to this server. could somebody please tell me how to do this? Thanks a lot...

Member Avatar for asebt
0
230
Member Avatar for inocntreper
Member Avatar for JRM
0
94
Member Avatar for sjcomp

Hello, I have a vector of shared_ptr<> I'd like to erase all those that are reset. This is how I do it. I call operator! which should return true if it's reset. Is it a good approach. There are so many ways to implement things and I'm trying to develop …

Member Avatar for vijayan121
0
126
Member Avatar for deadrabit

heyya, sorry if this is the wrong forum for this... but i can hardly be blamed =p... anyway, my line of code that gives me problem is this str[0] =ffd.cFileName; where str is an array of strings, and ffd is of WIN32_FIND_DATA type. ffd.cFileName should be of type TCHAR. my …

Member Avatar for Nick Evan
0
211
Member Avatar for VIeditorlover

Hi, I have a problem - when I close my web browser it clean up cache files. The same if is process terminated by tool like debugger or task manager. Only known way how to do it is break power, but... So is there a way how to bypass filesystem …

Member Avatar for vijayan121
0
128
Member Avatar for sjcomp

Hello, I'm using a library which creates allows me to set void* userData for some of it's objects, so I can connect their objects with mine. When an event happens I get their object and I can retrieve my class from it using casting. My question is about the performance …

Member Avatar for vijayan121
0
111
Member Avatar for look@me

i have this assigment and i need someone to help me in the solution as soon as possible because the assigment is due in 7/1/2008 the problem is D] A Tale from the Dark Side of The Moon Program: pink.(c|cpp|java) Input: pink.in Balloon Color: Pink Us: So why don’t you …

Member Avatar for ithelp
0
341
Member Avatar for Student1

Hi, I'm new here. I am having problems reading this code, to understand what each function does as I do not have much experience with this computer programming. I hope to get an idea of this code as a base, to use it as a LED blinker to allow me …

Member Avatar for Nick Evan
0
111
Member Avatar for jowereya

plz any one help me to solve this two proble befor 8/2/2008 plzzzzzzzzzzzzzzzzzzzzz helpe me >>> Problem 1: Fermat’s Theorem Program: fermat.cpp Input: fermat.in Output: fermat.out Description In a letter dated December 25, 1640; the great mathematician Pierre de Fermat wrote to Marin Mersenne that he just proved that an …

Member Avatar for Nick Evan
0
275
Member Avatar for bhuvanwip
Member Avatar for blcase

I am trying to overload the + and - operator for my class Collect class Collect is an array of movies (class Movie) so i need to add a movie to the array and subtract a movie from the array. the only way i know how to do code this …

Member Avatar for Agni
0
172
Member Avatar for infernojmd

Write a program that accepts the number of people in each of the three age categories, performs the necessary computations, and displays a bill for the group's admission similar to the display below. Be sure to test for a variety of values. Here is a sample display after three values …

Member Avatar for infernojmd
0
124
Member Avatar for kahn1

I know its easy but its been a long week of test. I have been working with a program to enter 5 integers( 1 2 3 4 5 ) then in its output it will display those same 5 integers. Then next to the last number it will encrypted the …

Member Avatar for WaltP
0
523
Member Avatar for jer_stud56

I'm not looking for a direct answer or anything considering I'm doing this for homework, but I'm a little confused on why my batting average and slugging percentage do not work. [code] batAvg = singles + doubles + triples + homeRuns / atBats; slgPer = singles + 2* doubles + …

Member Avatar for jer_stud56
0
458
Member Avatar for blcase

[code=c++] #include <iostream> #include <string> #include "Movie.h" #include "Collect.h" using namespace std; int main() { Collect c1; c1.setTitle("BestofBest"); Movie m1, m2, m3("John Ford", "Stagecoach", "Western", 96, "G", "1939"); m1.set("David Lean", "Doctor Zhivago", "Historical", 200, "G", "1965" ); m2.setDirector("John Avildsen"); m2.setTitle("Rocky"); m2.setGenre("Sports"); m2.setLength(120); m2.setRating("G"); m2.setRelease("1976"); Movie m4(m2); cout << m4.getDirector() << …

Member Avatar for John A
0
102
Member Avatar for Icetigris

I'm learning OpenGL for a class and for the lulz and I'm trying to write a program that does the following: -Open a 500x500 window with a 10x10 grid of black squares with a 1 pixel white border around them. (done, works) -Make the window resize without it going wonky. …

0
59
Member Avatar for mrjoli021

Is there an e-mail class that I can use to be able to send e-mails. I dont need to send any attachments just text.

Member Avatar for John A
0
74
Member Avatar for tootypegs

Hi I have the following string of hex '38 55 FD FF'. Somehow i need to get the value -174792 from it. I think it involves reversing the bits to 'FF FD 55 38' then showing its binary representation and reversing all the bits so that 1's become 0's and …

Member Avatar for tootypegs
0
139
Member Avatar for robotnixon

My professor gave us a set of class specifications for three classes. Vehicle, Car, and Truck. My vehicle class works fine, and utilizing it in the other classes is fine as well but I'm having trouble implementing the individual class specifications in the other two. Really the only thing I …

Member Avatar for John A
0
111
Member Avatar for kux

As i knew the <stdarg.h> header should have the following function int vfscanf(FILE *stream, const char *format, va_list ap); but under Visual Studio 2005, after including the header and calling the function i get 'vfscanf': identifier not found if the function is not declared, can u tell me some simmilar …

Member Avatar for WaltP
0
157
Member Avatar for gcardonav

Greetings I just installed Virtual and I am trying to learn from it.. I was running a program which I believe to have no problems in the coding. My question is the following.. When I try to compile the program I get the following error [inlinecode]1>------ Build started: Project: Shapes, …

Member Avatar for JRM
0
647
Member Avatar for kahn1

Having just a few problem with bring the difference of time times back into this form HH: MM:SS. I am required to you % , and fill the remaining space with 0's. Some of my code is just previous rambling that I turned into comments. Any ideas would be of …

Member Avatar for vmanes
0
112
Member Avatar for vilastadoori

I want the following pattern 123454321 1234 4321 123 321 12 21 1 1 I am able to acheive 12345 1234 123 12 1 I am not able to get the logic in the code as the lines increase the spaces should increase... Please help...this is killing my sleep. Regards …

Member Avatar for vilastadoori
0
139
Member Avatar for johndory

Hi, I have to write a program that creates a polynomial with n coefficients and performs different operations. eg. 3x^2 + 5x + 1. This may be defined as poly P(3) i.e p is a 3rd order polynomial. the coefficients may be set as double Coef[3] = {3, 5 , …

Member Avatar for Duoas
0
87
Member Avatar for vishalkhialani

Dear All, I am currently doing my college project and daily I come across challenges for example: How do I make the dos window cover the full screen ? How do I change the font color in dos ? I think one needs to access certain libary functions for this. …

Member Avatar for Ancient Dragon
0
74
Member Avatar for fromme

Can any 1 brief me abot, what static code analysis is. And few links, where i can get freeware or open source codes for such analysing tools

Member Avatar for vijayan121
0
106
Member Avatar for Bazman76

Thanks again. I've tried implementing the following code in Visual c++ 6: [code=cpp]#include <iostream> using std::cout; using std::cin; using std::endl; #include <cmath> int main(){ int binary, n; double temp, total; total =0; cout << "Please enter the binary number: "; cin >> binary; n = floor(log10(binary)) + 1; for(int i=1; …

Member Avatar for Bazman76
0
148
Member Avatar for cplus2x

Candy Machine Simulation Write a program to simulate a candy machine.Your machine offers candy for 75 cents, gum for 50 cents, and chips for $1.You should ask the user repeatedly which of the three items she wishes to purchase, or whether she wants to quit.If she chooses to purchase an …

Member Avatar for Slate2006
0
383
Member Avatar for jenymaru08

Please help me how you will make a program that using structure with a structure ?? example please struct data { char name; int age; } how will you make your structure be in within structure ??? and please kindly explain what this mean ppre->link=ploc->link ? ? ? ?

Member Avatar for hu_is_anonymous
0
150
Member Avatar for Arctic

[code=cpp]/*I've actually located the segmentation fault location, I believe it is because I am trying to declare one array memory location equal to another when they are in seperate memory segments. However, if this is the case I have no idea on how to correct it. Here is my code …

Member Avatar for vijayan121
0
160
Member Avatar for Kupitzc

I'm in a CS class in college now, and it's in C++. I have done all the things we're covering this semester... but in Java. I'm trying to write a basic program that uses a 3d char array to store the last names of passengers in an airplane, but when …

Member Avatar for Nick Evan
0
110
Member Avatar for VersEtreOuNe

I'm making a program that is supposed to store the circles in a file, each circle should have an id and a radius. after i Add some circles to the file i need to open it again and search for a specific Id to display it. Here's what I've done …

Member Avatar for VersEtreOuNe
0
125
Member Avatar for daviddoria

Is there a way to interpolate between RGB values? I have a set of values that I want to map (linearly or otherwise) to colors from a color_min RGB triple to a color_max RGB triple. Since RGB is not "incrementable", how would I do this? Thanks, David

Member Avatar for Duoas
0
106
Member Avatar for C++masterinneed

[code=c++] bool list::remove (char * key) { char id[100]; cin.get(key, 100 ); cin.ignore(1, '\n'); //cin >> key; //remove data from the list if it exists node * prev = NULL; node * curr = headbyName; while (curr) { curr->item.getName(id); if(strcmp(key, id) == 0) { if(!prev) headbyName = curr->next; else prev->next …

Member Avatar for C++masterinneed
0
110
Member Avatar for Nyx18

what im trying to do is read in a data from a file into 4 different arrays then also read in the same data using array of structs. the assignment is to show that we know how to use both methods of reading in and sorting the data. i have …

Member Avatar for Ancient Dragon
0
83
Member Avatar for Nyx18

what i have to do is read in a maximum of 10 animals from a file (one animal per line) but if there are more than 10 animals in the file im supposed to ignore the rest and only read in the first 10. before i start to read in …

Member Avatar for twomers
0
100
Member Avatar for Metalsiege

Hey everyone.. I'm having a little problem with something I'm writing for a class.. I'm supposed to use while and a nested IF statement in the solution, but every time I run it I get the following back: [quote]Run-Time Check Failure #3 - The variable 'A' is being used without …

Member Avatar for Metalsiege
0
267
Member Avatar for nate12457

I'm getting 3 unresolved external symbol errors. I think it's probably syntax but I can't seem to find it. This is a class I was supposed to write based on the professors specifications. The header and implementation file are mine, while the driver file cannot be edited for this assignment. …

Member Avatar for nate12457
0
147
Member Avatar for FAZ3

ok I got this far in the code but I can't seem to get a person to enter an age and the program to return the info of those with the same age. I think this is what I need to use...or at least something like this on my code. …

Member Avatar for WaltP
0
85
Member Avatar for mark192

When I click on the exe file to open it up via a folder or my desktop etc... it will show a black cmd window for about half a second and then close, however if i find the directory of my exe through cmd and then run it that way, …

Member Avatar for WaltP
0
299
Member Avatar for guitarrick

Lost again...Just trying to "tie" a header file to a .cpp file, but I keep getting a 'need ;' before '{' ..... in my .cpp file at LIST::LIST() { x = 0; } Here are both files that I am fooling with: [CODE=C++] #ifndef LISTS_H #define LISTS_H #include <iostream> using …

Member Avatar for Duoas
0
123
Member Avatar for atish00

[CODE]corr[8]="pizzaboy"; error-- cannot convert char* to char corr[]="pizzaboy"; error-- char has zero values corr[0]="p" corr[1]="i" corr[2]="z" ----- syntax error corr[8]='pizzaboy' ------- char const can have 2 chars [/CODE] Is there any way to input:'( :'( :'( :'( :'(

Member Avatar for Ancient Dragon
0
465
Member Avatar for MikeKristal

I took out a lot of code, hence all of the variables you can't see, but for some reason, this part is the only one thats screwing up. When you enter zero, its supposed to "cout" a phrase that you don't have money, but when I run it, it tells …

Member Avatar for MikeKristal
0
111
Member Avatar for shadowfire36

i have done some coding back in '99 in visual basic, and i remember there a command to excutse a message box to input data . is there a similar function in C++ to excute a message box for input in a windows os ?

Member Avatar for John A
0
133
Member Avatar for andyg55

input file: 1 0 0 2 1 0 0 2 1 I would like to produce this in a 3x3 array on screen. My code: [code] #include <fstream.h> #include <stdlib.h> int i, j; int matrix[3][3]; int main () { ifstream inFile; inFile.open("input.txt"); if (!inFile) { printf ("Unable to open input …

Member Avatar for VernonDozier
0
175
Member Avatar for enrgpro

I have no background with programing, but would like to start learning. Can you recomend a good book to start with.

Member Avatar for Ancient Dragon
0
71
Member Avatar for gcardonav

Hello guys, how are all you doinbg ? Well I just created this program to cound 24 hours. The program runs fine but my only problem is when I ran the programs i get the following [inlinecode]0:0:0 4469690:0:1 4469690:0:2 [/inlinecode] Where is the number 446969 coming from ? I am …

Member Avatar for gcardonav
0
128
Member Avatar for atish00

My project is to build a hotel menu and billing program. The problem is I have to use user defined functions to do it. 1st Function [code=c++]int password(char usr_name[8], char pwd[]); { int j=0,k=0,i=0,m=0; corr[8]=pizzaboy; for(i=0;usr_name[i]!='\0';i++) { if (usr_name[i]=corr[i]) n=1; } else n=0; po[5]=qwerty; for(j=0;pwd[j]!='/0';j++) { if (pwd[j]=po[j]) m=1; else …

Member Avatar for Ancient Dragon
0
564
Member Avatar for CodeBoy101

I'm new to C++ and I'm working with the Dev-C++ complier and I'm wondering, Is there a way to change the consoe app font? I would also like to know if more than one font can be used simultaneously? thanks :)

Member Avatar for Ancient Dragon
0
90
Member Avatar for atish00

Guyz I have again got a problem with functions. [ICODE]"" Write a function to input matrices"" [/ICODE] Or how can I input using fuctions ?? is it possble ?? so far I have developed a few lines. [CODE] //fuction to input a 2D-array. int multi_array(int r , int c)//r is …

Member Avatar for atish00
0
184

The End.