49,757 Topics

Member Avatar for
Member Avatar for harneetarora

Hi, I am having problem in making the program work in while loop. The program is working fine but I want to make it work in one big loop and don't want to use strcpy. Instead of that I just wanna get one word and do it in a loop. …

Member Avatar for Ancient Dragon
0
93
Member Avatar for p_conk

I wanna make a program that can request to the web, is there any library for that ? Ive been googling, I found some like opentop but its not free and the other can't run in cross platform.

Member Avatar for p_conk
0
107
Member Avatar for LindaWiklund

When trying to run my application it says it needs "libglib-2.0-0.dll" to run. The file is in\glib-2.14.6\bin but I don't seem to be able to link to it. I am using Eclipse so I have tryed setting MinGW C++ Linker -> Libraries->Library search path (-L) to "C:\glib-2.14.6\bin" and Libraries (-l) …

Member Avatar for mitrmkar
0
164
Member Avatar for Mander

hello, i have found some other with this problem but it diddent solfe it for me. Thats why i ask it here, I am trying to learn the langue c++ i write in Visual studio 2005 and 2008 pro this is my first little program byside hello world and calculater. …

Member Avatar for Mander
0
334
Member Avatar for amitahlawat20

#include<iostream.h> #include<string.h> class person { protected: char name[20]; int code; public: person(char *a,int c) { strcpy(name,a); code=c; } void dis() { cout<<endl<<"name : "<<name; cout<<endl<<"code : "<<code; } }; class account:virtual public person { protected: long pay; public: account(char *a,int b,long c):person(a,b) { pay=c; } void dis() { person::dis(); cout<<endl<<"pay …

Member Avatar for bugmenot
0
487
Member Avatar for sahil_itprof

My CPP program gets abruptly terminated..... I think this happens because by some part of the program itself, the TC.exe gets overwritten and thats why it gets terminated..... Can any one help me out????

Member Avatar for sahil_itprof
0
112
Member Avatar for citystud

I need to use an array with size 900000. However, the program fails to run. How can I solve it? I used Visual C++ 6.0. e.g double data[900000];

Member Avatar for sarehu
0
32
Member Avatar for henpecked1

Good day yet again ladies and gents. Today I'm having problems with strings and such. I've been tasked with creating fixed char arrays to contain first name, last name, and middle name. I've managed that, and have the calls in my main. I'm also tasked with using strlen (specifically) to …

Member Avatar for henpecked1
0
279
Member Avatar for VernonDozier

This is my first shot at running an executable program from a web page. The program is going to get a lot bigger, as will the web site. I have xampp installed and I am using that. I have two simple files: C:\xampp\htdocs\execlink.html [code=html] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 …

Member Avatar for VernonDozier
0
490
Member Avatar for starkman

Hi there, Hopefully this a quick question. Say i have program prog1.cpp and prog2.cpp and they will both take the same amount of time. i.e. One is reading a file and outputs a figure and the other is a video application Is there a way i can get these to …

Member Avatar for Ancient Dragon
0
191
Member Avatar for Cosa

[code] void ChangeAddress() { char searchaddress; char newaddress; cout << endl; cout << "Please enter street name to be changed "; cin >> searchaddress; for (int i=0; i<numrec; i++) { if (strcmp(SubscriberID[i].Subscriber_Address.streetname, searchaddress) == 0); { cout << "Enter the new street name: "; cin >> newaddress; } } } …

Member Avatar for Cosa
0
282
Member Avatar for Jennifer84

I have a simpile question. I have a string like this. [code] "Num == 1" [/code] Is it possible to extract this in any way so it will executable code in: [code] int Num = 1; if ( Num == 1 ) // To extract that string and put that …

Member Avatar for Jennifer84
0
105
Member Avatar for digital_ice7

why cant i type in my address??? [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; const int maxstring = 120; typedef char stringtype[maxstring]; void newuser(){ system ("cls"); stringtype name; string type, id, cnumber, address; double amount; ofstream out; cout << "ENTER YOUR NAME: "; cin >> name; out.open(name, ios::out); …

Member Avatar for skatamatic
0
120
Member Avatar for jimJohnson

Hey everyone I am kind of stuck with these function. i am trying to work ahead to get stuff done faster and this is what my output is so far. I am stuck on the width part. I am not trying to have anyone do my assignment for me and …

Member Avatar for Lerner
0
538
Member Avatar for morb

Hi! I have a problem with graphics in c++. It is a simple program, that displays circle. [CODE]#include "stdafx.h" #include "iostream" #include "graphics.h" #include <cstdlib> void main() { int gdriver = 9; int gmode = 2; initgraph(&gdriver,&gmode,""); setbkcolor(WHITE); setcolor(BLACK); cleardevice(); circle(320,240,180); getch(); closegraph(); }[/CODE] In visual studio i have error: …

Member Avatar for morb
0
3K
Member Avatar for yarita

Can anybody help me figure out how to fix this so it would come out the highest & lowest score??? [code=cplusplus]: #include <iostream> #include <iomanip> using namespace std; int main() { double *score; double total = 0; double average; double max = 0; double min = 0; int testscore; int …

Member Avatar for Majestics
0
156
Member Avatar for amitahlawat20

I am not able to figure out the code required for accepting a string from user , but the memory for it should be dynamically allocated and referenced using pointer. Have a look at the following: char *p=new char[length_of_string+1]; This statement would work to dynamically allocate the string ,but still …

Member Avatar for Narue
0
91
Member Avatar for sanfan49er

I have been working on this code and I can't get it to work any help out there? I am a new user and would really appreciate it if somebody can correct whats going wrong with it. [code=cplusplus] // DEBUG10-4 // PartTimeEmployee derives from Employee // Employees make $800 per …

Member Avatar for Narue
0
105
Member Avatar for kireol

I'm was a web application developer for years. I'm dabbling in programming in a dialog/event environment by writing an app on my AT&T tilt(PPC). big change for me. I wrote a simple app on my tilt that connects to a server, gets data, and updates some controls with the data. …

Member Avatar for vijayan121
0
126
Member Avatar for dan9992

Im trying to read lines in from a txt file to write into another txt file but at the moment its only reading the first line. I need it to read 1 line at a time and store it to add to another txt file before reading the next line. …

Member Avatar for dan9992
0
79
Member Avatar for manikantag

Hi All, Does anyone know how to generate sequence diagrams from C++ Source code using Rational Software Architect(RSA)? If anyone knows please help me in this issues. Thanks & Regards, Manikanta.

Member Avatar for manikantag
0
106
Member Avatar for USUAggie

Hello all, I am having some trouble creating and using a template based linked list and I hope you all can help me out. I have created a LinkedList class, and I am trying to use it in my main, but I get a unresolved external link error, that I …

Member Avatar for bugmenot
0
78
Member Avatar for Xerema

Hello, I just began doing c++ today, and i've done a program like this: [code=cplusplus] #include <iostream> using namespace std; int main() { int num1; int num2; int valinta; int valinta2; cout<<"Haluatko pelata pelia? 1.Kylla 2.En\n"; cin>>valinta; if(valinta == 1){ cout<<"Paljonko on 3+2: "; cin>>num1; cin.ignore(); if(num1 == 5){ cout<<"Aivan …

Member Avatar for samer.daur
0
96
Member Avatar for Jennifer84

This code works well: [code] int One = 1; int Two = 2; if ( One == 1 && Two == 2) { int i = 1; } [/code] What I now wonder is this. I want to put everything that is written inside the () in a textBox so …

Member Avatar for Jennifer84
0
89
Member Avatar for crazywoods

Write a C++ program called “HW3c.cpp” that will solve the following problem: The pressure of a gas changes as the volume and temperature of the gas vary. We are all familiar with the ideal gas equation of state which relates pressure, specific volume and temperature (Pv = RT) where P …

Member Avatar for Narue
0
154
Member Avatar for crazywoods

Your instructor wants a program that will read in a set of grades from a file called “grade.txt” (see below and is available on blackboard under assignments) and report the total number of letter grades i.e. A, B, C, D and F in the file. You program must use case …

Member Avatar for plgriffith
0
257
Member Avatar for uncertainty

What library is there in C++ that has the ServerSocket, Socket,MulticastSocket, Datagram & DatagramSocket classes?it is java.net in java i guess :(

Member Avatar for hammerhead
0
111
Member Avatar for Jennifer84

I wonder if I have something like this where Replace is the same as/"contains": Number == 5. My question is if it is possible to put this: Number == 5 to a std::string in any way through Replace ? [code] #define Replace Number == 5 [/code]

Member Avatar for Jennifer84
0
336
Member Avatar for Lensva

[code] #include <iostream> using namespace std; typedef unsigned short ushort; typedef unsigned long ulong; ulong power(ushort, ushort); int main() { ushort x,y; ulong z; cin>> x; cin>> y; z=power(x,y); cout<< z; return 0; } ulong power(ushort i, ushort j) { if (j==1) return i; [B]else return (i * power(i, j-1)); …

Member Avatar for Lensva
0
93
Member Avatar for IT Girl

Hi everybody, can you help me to solve this problem ?!! I need your help please .. [COLOR=#000000](1) [/COLOR][COLOR=#000000]Define a structure named menuItemSpecificationType that stores ingredients in a menu item (string [4]) and a brief description of the item (string).[/COLOR] [COLOR=#000000](2) [/COLOR][COLOR=#000000]Define a structure named menuItemType with four components: num …

Member Avatar for lAmoebal
0
447

The End.