49,761 Topics

Member Avatar for
Member Avatar for brk235

From the given code below everytime i need to print the name as rama+value of the integer variable. if i=10; then the output:rama10 should be printed... i have probelm to add string to the integer variable..please help anyone...thanks in advacne... class abc { private: int a,i; string name; public: void …

Member Avatar for brk235
0
193
Member Avatar for Black Magic

Hey, I was reading my book about C++ and read the default input piece of equipment was the keyboard, I was just wondering if there was a "simple" (ish) way to change it, example if i pressed a button on the monitor it would "cout << "monitor = pressed";" or …

Member Avatar for Duoas
0
114
Member Avatar for barnes138

Please help, I can't get more than 5 decimal places in my answers and I don't know how to tweak the code to allow for this. Any help would be greatly appreciated. DB #include <iostream> using namespace std; int main() { system("title You can Convert Miles to Kilometers or Convert …

Member Avatar for barnes138
0
93
Member Avatar for Hockeyfreak889

How would you open a file with c++ , for example when you run the program it opens a game of minesweeper. Also how would you save a copy of the minesweeper to the desktop?

Member Avatar for Duoas
0
108
Member Avatar for savinki

why cant we use strcat without initialing first parameter? e.g. char *b = "a"; char *a; strcat(a,b);

Member Avatar for Radical Edward
0
81
Member Avatar for sieghart0123

I’m a beginner in C++ programming, so please forgive me if this question is somewhat absurd. I am just wondering which approach is better: [INDENT]1. Upon program start-up, create an array of objects based on data stored in a text file. When the program terminates, the array of objects (and …

Member Avatar for Radical Edward
0
79
Member Avatar for Jennifer84

I have a ZedGraphControl on my Form. When the form open there is a lot of code that will draw a graph. A few lines of this code is in the first codeview here. From what I can understand, I beleive this code will execute once when the Form opens: …

Member Avatar for Radical Edward
0
140
Member Avatar for brk235

Hi friends..i have doubt about C++ programming. How to give names for the elemetns in an array of objects...

Member Avatar for vijayan121
0
102
Member Avatar for joshmo

how can i check if my text file is empty??? i have tried something using eof but it doesnt seem to work or am just using it wrongly [code] if(infile.eof())//check if it is empty /*also tried this*/ if(infile.eof()==0) [/code]

Member Avatar for Radical Edward
0
104
Member Avatar for timdog345

This is what I have, but I need to make a for loop instead of the initialize steep. PLEASE HELP [code] int main () { int numb[10];//1,2,4,8,16,32,64,128,256,512 int numb2[10]; int counter, counter2; /* numb[0]=1,numb[1]=2,numb[2]=4,numb[3]=8,numb[4]=16,numb[5]=32; numb[6]=64,numb[7]=128,numb[8]=256,numb[9]=512; numb2[0]=0,numb2[1]=1,numb2[2]=5,numb2[3]=3,numb2[4]=10,numb2[5]=5; numb2[6]=15,numb2[7]=7,numb2[8]=20,numb2[9]=9; */ for (int z=0; z<10; z++) cout<<numb[z]<<" "; cout<<endl<<endl; for (int x=0; x<10; …

Member Avatar for timdog345
0
80
Member Avatar for purepecha

[code=cplusplus] //I got almos this program done, it gets the apropiate result skipping some steps. //How do i pass the "int diff" to the "printText function". diff is the largest elemt or the //more repetitive letter from a text file, where the alphabet was shifted by 12. //Also, The largest …

Member Avatar for William Hemsworth
0
99
Member Avatar for Gagless

I want to recursively check if two strings are equal, not in size, but character by character. I am unallowed to use loops and the == operator. I tried to use two parallel arrays, but when testing my function I got undesired results. Here's what I came up with: [CODE]int …

Member Avatar for William Hemsworth
0
1K
Member Avatar for grommet2481

Hey I know this is really simple, I'm studying my first course of C++. In my prac for the week it asks: "A TrainCar is a base class representing carriages for a train. It defines no attributes but has a public function called shape which accepts no arguments and returns …

Member Avatar for Asat232
0
143
Member Avatar for Adrian99420

Hi, I created a checklistbox and binded the display value from a MS-Access table. Next, I am trying get the checked item but I keep getting "System.Data.DataRowView" Here is what I did: [CODE] private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { this->oleDbDataAdapter1->SelectCommand->CommandText="SELECT DISTINCT Profile_Name FROM Profiles"; this->oleDbDataAdapter1->Fill(dataSet1,"Profiles"); DataTable^dt= dataSet1->Tables["Profiles"]; checkedListBox1->DataSource= dt; …

Member Avatar for mitrmkar
0
145
Member Avatar for C_isoundu

Here is my problem, if you run the program(using piping), it should output the followings: [ICODE]========================= PHANTOM COMPANY INVOICE PRODUCT ID QUANTITY PRICE ($) COST ($) P010001 2 24.99 49.98 DVD-player5 1 58.95 58.95 P010002 20 8.85 177.00 ... TOTAL COST = $xxxxx.xx[/ICODE] my invoice is not the same as …

Member Avatar for joshmo
0
104
Member Avatar for risa

How to close dialog box if it doesnt hav OK and CANCEL Button in windows programming.the dialog box is shown with DoModal which inturn calls onInitDialog().But how to close it ?does EndDialog hepls and how ?where to call EndDialog?

Member Avatar for Anitaj
0
215
Member Avatar for zawpai

Hi, I get some problems when I run the following codes. #include<iostream.h> class Distance { protected: int feet; float inches; public: Distance() { feet = 0; inches = 0; } Distance(int ft, float in) { feet = ft; inches = in; } void get_dist() { cout << "\n Enter feet …

Member Avatar for Nick Evan
0
288
Member Avatar for lifesuk

i am new to c++, currently working on an assignment, now i'm stuck in skipping the comment lines in the txt file. the txt file is something like this: #com1 A1 A2 A3 #com2 B1 B2 B3 ... what i need to do is to enter commands to display the …

Member Avatar for Nick Evan
0
3K
Member Avatar for Black Magic

Hey, I am not stuck on this or anything just a bit confused about if this is the right way to go.. Well i was wondering on the river (five cards that go into the middle of the table) i am going to make them random and that is no …

Member Avatar for Salem
0
99
Member Avatar for Kadence

I'm confused about the use of the dereference operator in the declaring of char arrays. I think I understand that the dereference operator is used to dereference memory addresses to their values, and also in an unrelated function in the declaration of pointers; and that arrays are like special pointers …

Member Avatar for Salem
0
201
Member Avatar for lahom

hi Iam creating an application(vc++) which supposed to find the similarity between two programs written in c++ (at SYNTAX and SEMANTICS). in SYNTAX: i used the tokenize method and save it in strings...thats works but the question is here in the SEMANTICS: how can i trace the semantics in the …

Member Avatar for Duoas
0
68
Member Avatar for Dr. Kelwin

Hi, all! How can i do handshake before using BIO pairs for encrypt/decrypt, if as transport i use Winsock(WSASend and WSARecv)? some example this is send function: [code] DWORD CSSLTLSLayer::Send(IN OVERLAPPED *pOverlapped, IN WSABUF *pBuffer, OUT PDWORD pdwWasSend) { size_t iBuffered = BIO_write(m_pSSLBIO, pBuffer->buf, pBuffer->len); BIO_flush(m_pSSLBIO); iBuffered = (int)BIO_ctrl_pending(m_pNetworkBIO); if …

0
51
Member Avatar for Talianika

Hi! Programing a program with the fibonacci numbers, but having some problems getting the program to work as it should. The problem is that the user which is using the program are going to type a "max value" of how far he wants to count the fibonacci numbers. So if …

Member Avatar for wellibedamned
0
119
Member Avatar for shankhs

hey guys do u know any good on line tutorial of graphs? ya i know there are many but i want the one which has source code to play around...... PLUS a detail description.... Thanx

Member Avatar for shankhs
0
98
Member Avatar for savinki

I want to split data in a string. The string will consist of several data. Before every element the length ofthe element will come. I want to exract data one by one. e.g. char * abc = "[length ]acsfdnhsjg[len]gvsdgdvheg[len]efgwetrge"; can someone help me!!!!!!!

Member Avatar for Radical Edward
0
167
Member Avatar for jpd727

Hey all, When I write even a hello world script like below [CODE]#include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } [/CODE] the windows command line flickers when trying to execute it, instead of staying there and showing me ? Is there anyway to refresh or make this start …

Member Avatar for Radical Edward
0
106
Member Avatar for Onixtender

Hi , this pr. works with clases but someway it just throws me a error: [code] switch (atoi(i))//yes its an int 1,2,3,... etc... { case 1: R S(r, h);//create new class R object named S,to constructor we give two parameters F * f1 = &S; //yess pointers polymorph.... cout << …

Member Avatar for Onixtender
0
80
Member Avatar for &rea

Hello, I am programming an image application for my thesis. I have got an image and I want to have the color of each pixel so I can make my own histogram. The problem is that I want to treat this histogram as an array but I don't know how …

0
60
Member Avatar for Run.[it]

Basically this Menu works however, when I enter in a string the default does catch it but then the Menu repeats the error so in essence isnt full proof. Would the way around this be to check the 1st entry by the user to see if its an integer, if …

Member Avatar for Run.[it]
0
141
Member Avatar for donnerCobra

Hi, I wanted to ask if you can help me with my example-sourecode to Wrap an C++ Object. I know Boost, but I don't want to use it cause of several points. Does someone knows an example code for an Object Wrapper? Thanks A LOT!!! [code=c] #include <Python/Python.h> #include <string.h> …

0
63

The End.