49,761 Topics
| |
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 … | |
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++. | |
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! | |
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: … | |
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; … | |
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 … | |
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 … | |
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, … | |
[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) ; // … | |
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 … | |
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 … | |
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" … | |
[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 … | |
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", … | |
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 ; … | |
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 … | |
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. :( … | |
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 … | |
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 … | |
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" … | |
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 … | |
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??? | |
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 … | |
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 … | |
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, … | |
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; … | |
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 … | |
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 … | |
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> … | |
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 |
The End.