51,593 Topics
![]() | |
Hi. I wanted to save an array elements to a text file using Microsoft Visual C++. But I cant seem to put the data into the saved file. I have this part of the code to initiate the save as dialog..Pls help.Thanks void DATADlg::OnSave() { CFile f; char Filter[]= {"DATA … | |
I am learning C++ using Stephen Pratas "C++ Primer Plus" (excellent book btw). However i am stuck on exercise 6 chapter 4, where in essence i just have to use new to allocate the array of structures dynamically. I can allocate a single structure dynamically, however i still do not … | |
Write a program that, given a file of text (called poems.dat), will read in several lines of text, until end of file is reached and display a table indicating the number of occurrences of each letter in the alphabet in the text. For example, the phrase “This is great fun! | |
Hello! I'm new to the site and I'm having trouble compiling my program. I was hoping that somebody can take a look at my code and try to point me in the right direction. It's a charge account program that consist of using a repetition control structure. Here are the … | |
:lol: hello i want to show the time in a certain program in part of seconds but i don't know,can you help me in solve this problem? thanks | |
I'm using windows sockets 2, and I've been able to write a server using a client array of sockets to hold more than 1 client at a time. All of this is fine and dandy, I can have multiple clients from the local machine connect to 127.0.0.1 without a problem. … | |
This code below suppose to repeatedly prompt the user for an hour number and if the hour is “free | |
Hello how is everyone doing! I just want to make sure that this code was working properly. I tried compling this code on Visual Basic C++ 6.0 and it worked out fine without any errors or warnings. I am not looking for a quick answer. I just want to receive … | |
:confused: Hello i am a newbie in programming in c++ and in linux. I hav knoppix in cdrom and i want to start programming in c++ with the help of knoppix. But I does not know anything about how to start. I don't know create a new c++ file in … | |
I started wrting c lessons for absoulute begginers to advanced users, I think material can be considered quality, and my students learn programming with this stuff. If you wish feel free to start reading it.Its only 8 lessons for now so maybe could be easier for you to start following … ![]() | |
Hi all! I'm working in a project in visual c++ 6.0 with the console application and I want to ask you how to create a program that has portability to work in both platforms, windows and linux. Another thing, which function we use to round a double to the nearest … | |
hii,i'm a beginner :o ,don't :lol: ,just show me the way btw,i learn abt c and c++ can u show me the big differences between 'em?? thank's | |
Hi, I'm trying to write a program for homework in my 2nd semester computer science class. What I need to do is update a master file with information based on a transaction file ( both are already created). i.e. from the transaction file I read in Lena 10 and I … | |
Hello. I'm taking a C++ course were the explanations are bad and we program only 3 times a semester. Therefore, my knowledge of C++ programming comes from trial-and-error. I'm sure that everyone had to do the Roman numerals to decimal conversion program at one point. The assignment goes something like … | |
Hello will someone please help!! Here is the assignment • Using a function with the header below, pass it arguments in main, alter ary1 contents and display ary2 contents in the function definition. Display the contents of ary1 in main after the function is called. void arrayTst(int ary1[], const int … | |
I have an assignment to create a mortgage calculator in C++. I have attempted to complete this but I cannot get it to compile. Any help would be appreciated. Here is what I have come up with: [code] #include <stdio.h> #include <math.h> using namespace std; /* Begin program */ int … | |
I create the dynamic array with malloc and assign the last char to NULL. When I assign the NULL character, the warning message as follow appear: `'=' : 'unsigned char ' differs in levels of indirection from 'void *'` The code is as follows: void main() { const char sendText[] … | |
just want to ask if this is an array program????... my professor told us to make array program that displays 10 names.. He also tells us that we can use C or C++ program.. i prefer using C cause im much familiar with C programs... my knowledge in Array is … | |
I have been fiddling with these damn loops for hours. I am new to c++ but not too programming. My teacher is absolutely worthless. she refuses to help me and explains things very poorly. I have a 100 % on the assignments in the class and do not wish to … | |
I have all this code for my project which is to copy a file to another file using windows coding in C ++ i have to repeat the the code 5 times using diffrent buffers everytime which the numbers are 1, 5, 10, 100, 1000 i know i have to … | |
i need help with writing a program that produces a hollow box of stars | |
Below is my source code for a tictactoe program. However, my output after first move always states invalid choice, no matter what number I enter? [code] #include <iostream> #include <string> #include <cmath> using namespace std; class TicTacToe { public: TicTacToe(); // constructor int Pick_Player(); // member function int Pick_Row(); // … | |
can someone give me a good link on how to add, subtract, multiply matrixes i cant fint it anywhere | |
Hello. I am looking for a c library that emulates the double data type (64bit) with integers (32bit). it should have basic arithmetic functions like add, sub, mul and div. already searched the web, but no luck so far. hope you can help me, thanks. | |
Any ideas on how to do this program because I have the slightest idea. This is what I have to do, [I][B]Multi-Function Calculator - Ask the user for 2 numbers, then ask them to select from a numbered list of operations. As rudimentry error checking, give them an extra chance … | |
Can anybody please tell me what is wrong with this piece of code? [code] std::string query; std::cout << "Enter the Query String :";// Type something with spaces here. e.g ( "financial instruments being traded on the American stock exchange" ); while (std::cin >> query ) { std::cout << query <<std::endl; … | |
There follows a fragment of a program in Borland C++: void __fastcall TForm1::FormCreate(TObject *Sender) { Memo1->Clear(); ListBox1->Clear(); Memo1->Lines->LoadFromFile("c:\\blitz\\history.txt"); a=Memo1->Lines->Count; x=0; while (x<a) { str1=Memo1->Lines->Strings[x]; if (str1 != "") { DATA MANIPULATION HERE, THEN if (ListBox1->Items->Count==0) ListBox1->Items->Strings[0]=str3; else ListBox1->Items->Add(str3); } } ListBox1->Items->SaveToFile("C:\\blitz\\history.txt"); Close(); } The form does not close, but "history.txt" … | |
Please I need help on how to insert elements into a sorted linked list.I actually have a list that contains names and scores for students and I want the elements to be inserted into the right postion such that the names of individual students are arranged alphabetically. This is my … | |
The following program Assignment#2 was assigned to us a few weeks ago. I understood that assignment. Our professor told us soon we would be editting it to run more efficient. We have now been introduced to struct nodes. Needless to say, I am very confused. Our new assignment is due … ![]() | |
I am presently learning c and c++.I find problems with linked lists and related topics.Can anyone suggest me the ideas to make them easy. | |
Hello im pretty new to proggramming. Im making a console program. I want to be able to play a sound when it opens. I have no clue on how to do this. :o Is it possible running a sound in a console program? Plz reply and thxXx for the help! | |
Hi! I'm new in C++, but perhaps this is a general problem, not C++ exclusive. This is printed in my console, "-1.#IND", when using a printf, when this occurs? thanks | |
Hello ladies and gents, I wanted to ask if any of you could help me out here, Ive got this program: [code] //Test programma voor Accelerated C++. #include <fstream> #include <iostream> #include <string> int main(int argc, char** argv) { int fail_count = 0; //for each file in the input list … | |
SUMMARY --------- I need the detailed steps of building a DLL project from .LIB & .H files using VC++ 6.0 DETAILES --------- I have Windows XP SP2 and I have installed Platform SDK in order to get the ibrary files to use in my Bluetooth application that will be developed … | |
Hello everyone, I used to have my MS Access 2002 DataBase placed in my application folder and connect to it through an OLEDB connection. Everything worked fine. Now I decided to create an ODBC DataSource and suddenly I'm not able to pass parameters to the SQL Query the way I … | |
hi all, this is my 1st message. i am a beginner in C. can anyone help me out with the following Turbo C problem. i am unable to complile my programs. i.e. instead of compiling my program the s/w compliles something else (tc\inclde\iostream....something of this sort of a file pops … | |
we have a project due that involves reading in data from a file which is a 30x20 grid consisting of 30 processes each of which have 10 CPU bursts and IO bursts. From this we are supposed to implement FCFS, SJF, RR and a multi-level feedback queue in C++. From … | |
hello, good day.. i would like to do a simple simulation ( discrete event simulation ) based on this article ( link below ) using C or C++ . as this is the first time i'm dealing with simulation, i dont know where should i start and what parameters/ algorithm … | |
i am totally stumped on what to do here. basically whats goin on is i have a 3D dynamic array and i need to have a cursor inside of it and move around on the inside. i do i go about doing that? like i said im completely stumped. here … ![]() | |
Ok, here's my code: [code] string connect; cout<<"enter node, then linked nodes"; cin>>node; while(node != 0) { cin.get( connect ); adjList.insert(make_pair(node,connect)); cin>>node; } [/code] The problem at hand is that the compiler (Dev C++) keeps telling me : 21 no matching function for call to `std::basic_istream<char, std::char_traits<char> >::get(std::string&, char)' referring … | |
in VC++.NET i am trying to create a gui, to display live video, i am using Intel OpenCV - i need help integrating OpenCV - if you could write a short gui it would be greatly appreciated - thanks | |
I had been studying OpenGL in DevCPP all the time. Using DevCPP you link OpenGL library files libopengl32.a and libglu32.a adjusting project options. But I dont know how to do this in VC++. Can you help me what files to link and how to link in Visual Studio 2005 for … | |
I'm doing this in visual C#.net.I'm a nwebie so bare with me. I'm creating a class I need to declare three fields: name,phone number, and birthday (month,day, and year). I'm not sure how to declare them. Is this correct :?: private string name private string phone number private int birthday | |
Hello everyone, Where exactly do I configure a C# application to install in a specific path? Like, for example: C:\Program Files\myApp Please note that I don't mean the deployment folder! I looked throughout the application properties, publish properties and publish Wizard, but didn't find a configuration option for that. Thanks … | |
Hi everyone, I am currently facing a problem with a program that I am writing. It is a computer simulation of the card game War. I am receiving this error [CODE]main.cpp:22: invalid conversion from `Card*' to `int' main.cpp:22: initializing argument 1 of `Card::Card(int)'[/CODE] Card is the name of one of … | |
In CApplView I create a Login Form. [code] void CApplView::Login_Entry(CDC *pDC) { .. if (pUserid == NULL) { pUserid = new CEdit; pUserid->Create(WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(x,y1,w,h), this, IDC_USER); pPasswd = new CEdit; pPasswd->Create(WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(x,y2,w,h), this, IDC_PASS); pbLogin = new CButton(); pbLogin->Create("Login",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(x,y3,w,h), this, IDB_LOGIN); } } [/code] How do I add code … | |
I doing assignment about file processing. It quite hard. 1.Sometimes can open the file sometimes cannot 2.How to overwrite y content in the file? 3. How to add Data into the file? Brief: You know I create the file then when I close the program. After that open again. It … | |
I want to check to see if a binary tree is perfect. this means that the height of the left and right subtrees of the root are equal and the left and right subtrees of the root are perfectly balanced binary trees. I have written the function but am not … | |
my program prompt an integer input but if the user type in a character the program crash! is there any solution to the problem MANY THANX |
The End.