49,761 Topics

Member Avatar for
Member Avatar for eranga262154

Hi all, I want to write some text(simply a string of characters) to the edit control on a click event. How can I do that. I know it is able to write something to the control using member function, [CODE]GetDlgItemText()[/CODE] by passing two arguments, control ID and string variable. Is …

Member Avatar for eranga262154
0
168
Member Avatar for DREAMWORLD

Hi, I am student of B.C.A Karnataka University Dharwad, Bijapur. Myself Krisha Jain please tell me the concept of templates and how we can access this in program(code). And some important notes on File Handling Functions in C++.

Member Avatar for ithelp
0
35
Member Avatar for bluejay_1111

New to the site, just need some help on this... Most of it is done, I just need to turn the wordInfo struct into a full-blown .h class. Any thoughts? It's attached... Appreciate it!

Member Avatar for bluejay_1111
0
168
Member Avatar for Tyster

Hi Folks, Total C++ newbie here so please excuse my errors! I have been tasked with writing a small program and I can't get it to work. Here is the task description... "A restaurant has 4 lunch combos for customers to choose: Combo A : Fried chicken with slaw [price: …

Member Avatar for Tyster
1
139
Member Avatar for Linda1

Another project on arrays. I need to get the smallest number in an array. Enclosed is code. Your input highly needed! [code] #include<iostream> using namespace std; int smallestnumberindex(const int number[int index]) int main() { int number[10]; int index; int smallestnumber; //initialize the array for (index = 0; index < 10; …

Member Avatar for Linda1
0
63
Member Avatar for Ratte

I need to read a text file that contains data of the following type: [code] John Doe 333222333 01/01/80 M PHY301 2005 Fall A PHY401 2005 Fall B PHY531 2006 Spring A John Doe 333222333 01/01/80 M PHY501 2005 Fall A PHY301 2005 Fall B PHY431 2006 Spring A John …

Member Avatar for vijayan121
0
126
Member Avatar for akoloff

I am wondering if it is possible at all to do the following things with modal dialog: I want some kind of task scheduler to automatically open dialog and execute the code, which is envoked usually by pressing the button inside the dialog. The problem is as soon as I …

0
47
Member Avatar for sarahger9

I wrote a program that searched a file word by word, looking for keywords from another file that needed to be replaced in the first file. I did this, but I need to state an error message if one of the keyword was never found. This is what i tried, …

0
54
Member Avatar for 4greatjustice

[code]#include <iostream> // for CableBills #include <iomanip> // for formatting manipulators #include <string> // for string variables #include <fstream> // for file streams using namespace std; // Prototype Functions void PrintHeading(ofstream& CableBills) ; // Inout void CustomerData(ofstream& CableBills, ifstream& CableRecs) ; // Inout int OutletCharge(int) ; int ServiceCharge(char) ; // …

Member Avatar for 4greatjustice
0
184
Member Avatar for slyrexy

Hey, i am a complete newbie to C++ and have a task to do. i have looked all though my textbook and all over the net and have not found any examples similar. my problem is i am trying to read from a text file and store the data as …

Member Avatar for slyrexy
0
82
Member Avatar for teppuus

Hello, I am trying to write data to a binary file. The function runs (the cout << "TEST" shows me that my loop is running the correct amount of times), but after the program comes to the end, it crashes and doesn't save the data to the binary file. Can …

Member Avatar for teppuus
0
82
Member Avatar for jenymaru08

i tried but it did not work.....please help me [code=cplusplus] #include <iostream.h> #include <conio.h> int length_str(char word[]); char cat_str(char word1[], char word2[]); void main() { clrscr(); char word[50],word1[50],word2[50]; int choice,z,y; do{clrscr(); cout<<"\t\tSELECT YOUR CHOICES" <<"\n\t [1] - tells number of characters the string has" <<"\n\t [2] - Concatenation of string" …

Member Avatar for ChaseVoid
-1
133
Member Avatar for jamess_jack24

[code=cplusplus] /*-------------------------------------------------------------------------- This is dllist.h file for defination of funcations -------------------------------------------------------------------------*/ #ifndef DLL #define DLL class DLLElement { public: DLLElement( void *itemPtr, int sortKey ); // initialize a list element DLLElement *next; // next element on list // NULL if this is the last DLLElement *prev; // previous element on …

Member Avatar for jamess_jack24
0
113
Member Avatar for Llama

ok so i made a code that makes something compatible with a never version ( it is not important). This is my code: [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main () { char File[150], re[4]; string line[5000]; string response; int counter=0; size_t found; string strtofind[]={"oolean1", "oolean2", …

Member Avatar for Llama
0
238
Member Avatar for Duki

I get error C2143: syntax error : missing ';' before '*'[/code] at the typedef line (and every other line with the word 'string'). ... //File: prob4.h #pragma once //header files + efficiency #include <string> #include <iostream> using std::cin ; using std::cout ; using std::endl ; typedef string * strPtr ; …

Member Avatar for Duki
0
892
Member Avatar for pacman326@gmail

Hi guys, our goal is to try to create a c++ rendition of the same game. I have coded all the way up to the first real part of the program, trying to remove cells based off of what the user inputs. [code] #include <iostream> #include <cstdlib> #include <ctime> using …

Member Avatar for pacman326@gmail
0
56
Member Avatar for Underdog67

This is what the code looks like. It's a simple program to determine which years are leap years, and which aren't. I'm having trouble ending the program if the user types ctrl-z. Any help would be appreciated. I know it's probably something simple, but I can't figure it out. :( …

Member Avatar for Underdog67
0
808
Member Avatar for sarahger9

Hi, I am writing a code that requires me to search for words within a text document. I had to build up words one character at a time in order to ignore punctuation when I search for the words. I did this without a problem. But now I am working …

Member Avatar for sarahger9
0
120
Member Avatar for Fool

This is a thread containing a problem similar to my previous thread"a crazy problem(at least to me)". Yet i start it in a new thread is because the approach will surely be much more complicated and perhaps should be treated as another crazy problem. This program should read in 2 …

Member Avatar for Fool
0
115
Member Avatar for wjyeo

Hey guys i need help over in my program. My error is that when i use cin for a int declaration, when i type in a char, they straight away have a infinite loop. I try using the cin.clear() but when i prompt the user to "enter a number again" …

Member Avatar for wjyeo
0
245
Member Avatar for NicAuf

I think that the only function that needs fixing is my ComputeHourlyPay function. Could somebody take a look and help me out here. [CODE=cplusplus] //Name: Nick Auffarth //Class: CS 140 Section 003 //Assignment: p03 //Date: October 15, 2007 #include <iostream> #include <iomanip> #include <cmath> #include <string> using namespace std; const …

Member Avatar for NicAuf
0
118
Member Avatar for akame

i plotted a parabola....when i try to join the previous pixel with the next pixel,it does not come out to be straight???cant we draw a smooth curve....joing pixels???if no then why???

Member Avatar for Salem
0
129
Member Avatar for Church

well i'm a bit of a beginner programmer.. i've taken a few classes but every time i look at a piece of code i get lost easily. But i do have a question.. I was reading this visual basic book and there was this thing about listing all of these …

Member Avatar for Church
0
107
Member Avatar for gallantmon1

I'm still confused with file i/o here and needs a bit of help on fixing the codes I have. Can anyone offer some help? I have two codes here that sort of work together. One is a database type of code that is supposed to get input form the user …

Member Avatar for gallantmon1
0
247
Member Avatar for Koldsoul

Hey fellow programmers. I am just starting to work on C++ and languages in computer programming. So far its not bad yet, but having an issue with this program I am trying to write. The program I am writing is to compute the sum of the minutes exercised per week, …

Member Avatar for Koldsoul
0
267
Member Avatar for pacman326@gmail

Hi guys, here is my code. [code] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; void chooseNumber() { int gameRow, gameColumn; cout << "Please enter two values, the row and column of the cell " << "you would like to pull from the gameboard." << endl; cin >> gameRow; …

Member Avatar for Narue
0
78
Member Avatar for katcipis

Hi, im starting to program in c++ and im starting to post in this forum too :-), i hope in the future i can help other people too but right now im the one who is needing some help. Im in the development team of a multi plataform software and …

0
42
Member Avatar for jrice528

This program was suppose to be with a function but I am trying to write without a function first, then adding one later. I am new to programming and still gettin basics. I got this much but its only giving me a 1 and a 0. Ive tried to find …

Member Avatar for iamthwee
0
177
Member Avatar for barbie 2

hi , i'm writing a program which calculates registration fee of student and this program opens an external txt file.It's my first time writing a program with an input file so i'm kinda confused.my program asks for the status and number of credits but does not gimme the fee. #include<iostream> …

Member Avatar for iamthwee
0
168
Member Avatar for MedianHansen

When i try to compile my source code, it comes up with two errors: the first one is: cannot find -lobjc the second one is: Id returned 1 exit status

Member Avatar for MedianHansen
0
76

The End.