49,757 Topics
| |
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. … | |
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. | |
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) … | |
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. … | |
#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 … | |
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???? | |
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]; | |
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 … | |
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 … | |
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 … | |
[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; } } } … | |
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 … | |
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); … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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. … | |
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. … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
What library is there in C++ that has the ServerSocket, Socket,MulticastSocket, Datagram & DatagramSocket classes?it is java.net in java i guess :( | |
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] | |
[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)); … | |
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 … |
The End.