49,762 Topics

Member Avatar for
Member Avatar for anu07

I am using borland compiler 3.0,is there any way such that the output window will close on its own after the required functions has been completed by the program?

Member Avatar for WaltP
0
47
Member Avatar for imhiya

[CODE]class Node { public: string name; list<string> edges; };[/CODE] [CODE]list<Node> nodes;[/CODE] Hello, Can you help. I used this class that you gave but i've struggling to add anything. I tried nodes.name.push_back(str); but no use, and also i tried nodes::name.push_back(str); i also tried to compare sections by trying nodes[i].name == temp; …

Member Avatar for mrnutty
0
147
Member Avatar for ntrncx

what is wrong with my code? in inputs like "radar" or "tttt" should say its palindrome. [CODE]#include <iostream> using namespace std; bool testpalindrome(string,int,int); int main() { string wordX; bool result; cout<<"Enter string: "; getline(cin,wordX); result=testpalindrome(wordX,wordX.length()-1,0); result==true ? cout<<"\nthe string is palindrome!" : cout<<"\nthe string is NOT palindrome!\n"; } bool testpalindrome(string …

Member Avatar for ntrncx
0
356
Member Avatar for boot-baby-boot

I want to write a simple c++ program that allows me to edit my database tables.Each table stands on its own(no table is related to another).The UI i want is simple.I want my tables to be shown as follows: [LIST=1] [*]Table-One [*]Table-Two [*]Table-Three [*]Table-Four [*]Table-Five [*]Table-Six [*]Table-Seven [*]Table-Eight [*]And-So-Forth [/LIST] …

Member Avatar for Ancient Dragon
0
447
Member Avatar for yapkm01

Newbie to C++ but i am a Java programmer. Trying to learn C++ now. Reading the C++ Primer by Stanley Lipmann. I don't understand this sentence in Chapter 3 about library types. He's talking about library type string and vector. "These library types are abstractions of more primitive types - …

0
84
Member Avatar for MixedCoder

[code]#include <iostream> #include <WinSock2.h> #include <mysql.h> #include <string> #include <vector> #include "action.h" using namespace std; MYSQL *con; st_mysql_res* res = NULL; MYSQL_FIELD * field[200]; MYSQL_ROW myRow; CAction * m_pActionList[1000]; int LoadActions(); int main() { con = mysql_init(con); if(!mysql_real_connect(con,"127.0.0.1","test","test","account_zf",NULL,NULL,NULL)) { cout<<"Error connected"<<endl; system("pause"); exit(-1); return false; } LoadActions(); system("pause"); return 0; …

Member Avatar for MixedCoder
0
250
Member Avatar for fadi_1234

how can i make table like this : For example: Fadi recommendattion ----- ---------------- 1212 you must at least gain :1kg if fadi>1212 you must at least gain 1 kg how to make a table like that in c++ and i want to put the result of if in recommendation …

Member Avatar for fadi_1234
0
311
Member Avatar for anu07

I have a little problem with strcmp here,the following code basically opens a file and writes to it until I enter "\esc",at which point the program should stop....but the problem is,it does not,and I can't figure out what might be the prob.Thanks for your time(I am using turbo c++ 3.0 …

Member Avatar for anu07
0
427
Member Avatar for subith86

I'm trying something like this [CODE]void receiver (char* x) { cout<<x<<endl; //prints "a" cout<<*x<<endl; //prints "a" cout<<&x<<endl; //prints address of x } int main() { char p = 'a'; cout<<p<<endl; //prints "a" cout<<&p<<endl; //prints "a" receiver(&p); } [/CODE] In the main function for both p and &p, it is printing …

Member Avatar for subith86
0
318
Member Avatar for Khoanyneosr

[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; …

Member Avatar for VernonDozier
0
585
Member Avatar for lima01

Hello. I want to make a game card that is played by two players who are on different PC's and playing via internet. I am new at network programing(I guess that is called socket programing), so I don't really know from where to start, I have done some digging on …

Member Avatar for dennisschagt
0
312
Member Avatar for C.Cen

Hi guys, I'm supposed to make a program that calculates how many months it would take to pay off your credit card balance with a 14% yearly interest rate. I've written out what I believe to be it but I end up getting this. [url]http://omg.wthax.org/error_2.png[/url] The program doesn't seem to …

Member Avatar for C.Cen
0
216
Member Avatar for jackmaverick1

Hi, I'm trying to make a program that will write to a file and tell it that the next time that the program is run to not do the first part of the program. [CODE] fstream install; //this is what all of the tutorials say to do. install.open(ready.txt); //this is …

Member Avatar for mike_2000_17
0
114
Member Avatar for VasquezPL

I have a big problem. Wheb I try to automate Outlook, I need to make a wrapper...My outlook version is 14. Unfortunatelly I need my proggy to work on all versions of Outlook. how to do that? My code to send email is: [CODE]string allbody; System.Diagnostics.Process.Start("outlook"); Outlook._Application oApp = new …

0
71
Member Avatar for SeePlusPlus2

I'm really lost on this topic. I'm trying to study for an exam. 1)When the symbol '&' is in front of a variable, it is referring to the address right? How is it different from a reference parameter? I keep getting them mixed up. 2)By dereferencing it, it means that …

Member Avatar for SeePlusPlus2
0
228
Member Avatar for ntrncx

here are some questions that i have to improve my code readability since i study alone and my code starts to be more big and more chaotic i have some questions that maybe will sound silly to more but i have to ask someone. 1- its better to declare global …

Member Avatar for ntrncx
0
127
Member Avatar for sarge66

I have not worked with the debugger at all and I have a assignment to debug a program. I don't want just the answer I need help using the debugger. Correct the Logical errors in the code so that the output of the program appears as such: * ** *** …

Member Avatar for template<>
0
204
Member Avatar for Khoanyneosr

So, I need to find a way to create a way for the computer to ask for input, for this example lets make it 1 and 2. 1 for yes and 2 for no. [CODE] int yes; int no; cout << Do you like orange chicken?" << endl; cout << …

Member Avatar for Khoanyneosr
0
419
Member Avatar for destroyer89100

Hello every body The doctor gave us to solve this assignment i tried to solve it but i could not can you tell me how i solve it please the assignment is attached and this is my code: [CODE] #include <iostream> #include <iomanip> //FOR SETW #include <climits> using namespace std; …

Member Avatar for floatingDivs
-4
200
Member Avatar for rena0514

Write a program that simulates the “heap” using a linked list. This program should take one node of size 9096 kb. Assume all request will be made in kb. The user should request a size of memory from the system, then the system should find memory that can be allocated …

Member Avatar for caut_baia
0
236
Member Avatar for visom

Hi, my homework problem is to convert minutes into hours AND minutes ex. 124 minutes = 2 hour(s) and 4 minute(s) (there will be some if statements for plurals of hours and minutes if possible) This is my code so far but I'm getting an error [CODE]#include <iostream> using namespace …

Member Avatar for visom
0
3K
Member Avatar for Jennifer84

Hi, I am trying to add 2 menuItems to a toolstrip menu. I cant get it to work and wonder what I am doing wrong. Also I like to add a click event to those items each that will open up the respective URL for each item "http://www.google.com" and "http://www.yahoo.com" …

Member Avatar for jonsca
0
165
Member Avatar for sarge66

I need help with a program for a class. I got all the issues taken care of but this one: error C3861: 'menu': identifier not found My program code is (I know it stupid but I can't see it) [CODE]#include <iostream> using namespace std; int main ( ) { int …

Member Avatar for Ancient Dragon
0
253
Member Avatar for ywong89

Hi. This program is pretty much working. I just can't figure out how to compare the higher hand when each player get a pair/three a kind. CardDeck.h [CODE]enum Suit {clubs, diamonds, hearts, spades}; //---------------- C L A S S C A R D ----------------------------------------- class Card // this class describes …

Member Avatar for ywong89
0
5K
Member Avatar for yncee_11

ERRORS: 8 C:\Documents and Settings\csc182\Desktop\devc++\ellipse.cpp `main' must return `int' C:\Documents and Settings\csc182\Desktop\devc++\Makefile.win [Build Error] [ellipse.o] Error 1 what does this errors mean?? here is the code.. #include<stdlib.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int x,y,i; int g=DETECT,d; initgraph(&g,&d,"\tc\bgi"); cleardevice(); x=getmaxx()/2; y=getmaxy()/2; settextstyle(TRIPLEX_FONT, HORIZ_DIR, 3); setbkcolor(rand()); setcolor(4); outtextxy(30,100,"Press"); outtextxy(30,130,"any"); outtextxy(30,160,"key"); outtextxy(30,190, …

Member Avatar for Caligulaminus
0
186
Member Avatar for chaithanyap

#include<iostream.h> class A { public: read() {cout<<"read"; }}; class B:public A {public: readb() { cout<<"readb"; } }; class C:public A { public: readc() {cout<<"readc"; } }; class D:public B,public C { public: readd() { cout<<"readd"; } }; main() { D d; //d.read(); d.readb(); } am getting error for this...

Member Avatar for Ezzaral
0
872
Member Avatar for taumang

i want to know what will be the sequence of values to be print out for the following algorithm using trace table count=1 count=count + 1 while(x<2)prin the value of x elseprint the value of x My answers is 0;2;2 idon't know if they are correct

Member Avatar for Ancient Dragon
0
83
Member Avatar for chrispen

1. a cow is defined as a guessed digit which is correct in value but not in position eg a secret number is 1234 and users guess is 2890 the result will be one.creat a value returning function called calcCows which accepts array parameters representing the user's and the secret …

Member Avatar for arkoenig
0
144
Member Avatar for shauzi158

Hello all. I am new to c++ and and our teachers have started Object oriented programming.. I am facing real trouble in understanding the concepts of constructor and destructor. Why are they used and how are they used.. Please post...

Member Avatar for floatingDivs
0
220
Member Avatar for vass1

Hello, I have just started to learn C++, and so I got my self a copy of "TEACH YOURSELF C++ IN 21 DAYS". 1/ Could someone pls say if this book is suitable for a new a newbie. 2/ And what about it's counterpart, " TEACH YOURSELF C++ IN 24 …

Member Avatar for txwooley
0
125

The End.