51,593 Topics

Member Avatar for
Member Avatar for bhoot_jb

heyy friends.. i m a beginner in C++ and am currently workin wid a program.. just for clrscr(), i have to include the whole conio.h file in my program inorder to clear the screen.. so is there any alternative to clrscr()?? please throw some light on this topic.. :)

Member Avatar for Majestics
0
3K
Member Avatar for robotnixon

Having some trouble with converting my driver input from one class to the friend class and then summing the array. My setGrade function is reading the input correctly (I think, the numbers match up) but I need to pass the class to the friend in order to add up the …

Member Avatar for robotnixon
0
456
Member Avatar for marianomartinez

Hello, i need to make a function to send an e-mail with an attachment using C++. The program must run in MS-DOS, so i think it couldn't be visual C++. Does anyone know any library with smtp functions for C or something like that? Thanks

Member Avatar for Ancient Dragon
0
31
Member Avatar for bornok15

I want to learn about firmware development using C++ like for printers.. What topics or lessons should i master in order to have some simple skills in doing this? anyone who could guide me?

Member Avatar for Ancient Dragon
0
71
Member Avatar for samer.daur

i want some tutorials in File structurte and Data structure... can anybody help me?!! i'll tell u my case briefly am asked to do an assignment in ma college depending on the 2 courses (File organization & Data structure) i need to buikl a class that implements linked list and …

Member Avatar for Ancient Dragon
0
134
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
110
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
111
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
170
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
342
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
491
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
115
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
36
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
285
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
507
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
194
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
285
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
108
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
123
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
545
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
161
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
96
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
106
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
129
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
84
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
108
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
83
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
98
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
90
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
157
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
259
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
112
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
393
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
99
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
452
Member Avatar for agrawalashishku

I am reposting this thread because the last time I posted it no one understood it and some people with a desire to help me posted solutions that didnt solve my problem. This actually caused the post count fo the thread to reach 5 which caused other people not to …

Member Avatar for vijayan121
0
99
Member Avatar for c++noob

So I have a program i am writing. relatvely simple, but i am not sure what to do. the first I am trying to make a program that displays loan amount, monthly payments, and number of payments based on the input (annual interest rate), (number of payments), and (amount of …

Member Avatar for lAmoebal
0
142
Member Avatar for zellex

Hello, I'm designing a C++ Program for a connect 4 game. I have the matrix set up, the test to determine if there is a winner, and now I need to design the computer to go against the player. This seems to be quite a challenge. First, I need to …

Member Avatar for mentkapto
0
1K
Member Avatar for nurulshidanoni

How to count> Is true I do this programming? [code=C++] { int count; count=0; count++; for ( int i = 0 ; i < students.size (); i++ ) { for ( int k = 0;k<students.at(i).examcode.size(); k++ ) { if (students.at (i).examcode.at(0)=0) { cout<<count++<< " "; } } } } [/code]

Member Avatar for hammerhead
0
150
Member Avatar for Jennifer84

I might wonder if I have an int vector like this and I want to achieve the averagevalue for Element 0-8 wich is ((1+2+3+4+5+6+7+8+9) / 9) = 5 What method could be used for this ? std::vector<int> Number(10); Number[0] = 1; Number[1] = 2; Number[2] = 3; Number[3] = 4; …

Member Avatar for Jennifer84
0
194
Member Avatar for scream2ice

hey evryone; I've created a matrix class (called fmatrix), and im facin a problem with one of the functions: read()......i cannot fill the matrix through keyboard as an input device and keep getting this error: error C2679: binary '>>' : no operator defined which takes a right-hand operand of type …

Member Avatar for scream2ice
0
140
Member Avatar for c++noobie

I have been doing c++ for somewhere between 1 1/2 and 3 months (I'm awful keeping up with time). I have a program (one of my first) that I have taken and added pieces to since I made it and it has come to be the piece of work it …

Member Avatar for c++noobie
0
2K
Member Avatar for ORA-MAN

Hi there, IN C# I use this way to define any variable (X for example) [code] using System; /// <summary> /// Summary description for Class1 /// </summary> public class Class1 { private _X; public Class1() { // // TODO: Add constructor logic here // } public String X { set …

Member Avatar for ORA-MAN
0
108
Member Avatar for sfurlow2

We're doing functions in our class, and we're supposed to write a function that displays a four-choice menu (with four character choices and a description of that choice). Then, it is supposed to output that character as a lower-case letter. If the character they enter isn't one of the choices, …

Member Avatar for WaltP
0
74
Member Avatar for hjjayakrishnan

Hey actually when we are usin the random function we generally tend to take all the no.s eg.random(5) 012345 but i wanted to take random from only a few no.s like 3 5 7 5 9 and not ny other numbers.. cud neone help me

Member Avatar for WaltP
0
65
Member Avatar for danibootstrap

The following is the code for Serial comm in Dev Cpp (OS :WinXp) .It is a project .It has a main.cpp ,serial.cpp and serial.h Serial.cpp [code=c] /* Serial I/O class using the Win32 file funcions for compatibility with all versions of Windows (including CE) */ #include "SFile.h" #include <stdio.h> #include …

0
79
Member Avatar for sfurlow2

For our assignment, we are supposed to use a file called functions.o. Our instructor told us it would compile with our .cpp files using the command, g++ functions.o * .cpp , but it isn't working. Is there something wrong with this command, or is there somewhere special I'm supposed to …

Member Avatar for vijayan121
0
62
Member Avatar for hjjayakrishnan

hey i just created a game of hangman in c++ with multiplayer facilities and stuff...but i wanted to add some music to it...could anyone help me??

Member Avatar for vmanes
0
104
Member Avatar for nurulshidanoni
Member Avatar for jtwsl13

I need to create a guessing number program that notifies the user whether or not they're guess is higher or lower to the random number created by the program. My problem is that the program only recognizes that the guess the user makes is lower than the random number. If …

Member Avatar for Ancient Dragon
0
77

The End.