51,593 Topics

Member Avatar for
Member Avatar for rontab68

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 …

Member Avatar for rontab68
0
157
Member Avatar for Lippy

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 …

Member Avatar for Narue
1
207
Member Avatar for Kanvas

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!

Member Avatar for Lerner
0
208
Member Avatar for hu_4life

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 …

Member Avatar for hu_4life
0
2K
Member Avatar for mhm_ra

: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

Member Avatar for WolfPack
0
454
Member Avatar for Mr Violent

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. …

Member Avatar for Mr Violent
0
93
Member Avatar for pete0

This code below suppose to repeatedly prompt the user for an hour number and if the hour is “free

Member Avatar for dubeyprateek
0
93
Member Avatar for leedurr

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 …

Member Avatar for WolfPack
0
148
Member Avatar for shaikh_mshariq

: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 …

Member Avatar for andor
0
763
Member Avatar for vurdlak

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 …

Member Avatar for iamthwee
0
141
Member Avatar for gampalu

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 …

Member Avatar for gampalu
0
108
Member Avatar for mice_cs

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

Member Avatar for Narue
0
109
Member Avatar for polishcannon

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 …

Member Avatar for WolfPack
0
72
Member Avatar for v_solid_snake

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 …

Member Avatar for Bench
0
450
Member Avatar for nthompkins

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 …

Member Avatar for nthompkins
0
186
Member Avatar for c++clueless

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 …

Member Avatar for Narue
0
170
Member Avatar for perlsu

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[] …

Member Avatar for Narue
0
398
Member Avatar for mccbebz

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 …

Member Avatar for Ancient Dragon
0
104
Member Avatar for lsu420luv

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 …

Member Avatar for Lerner
0
413
Member Avatar for heavyc

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 …

Member Avatar for WolfPack
0
138
Member Avatar for Scoobs
Member Avatar for Bench
0
129
Member Avatar for djbsabkcb

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(); // …

Member Avatar for Narue
0
809
Member Avatar for tyczj

can someone give me a good link on how to add, subtract, multiply matrixes i cant fint it anywhere

Member Avatar for tyczj
0
140
Member Avatar for shlinky

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.

Member Avatar for shlinky
0
155
Member Avatar for That Man

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 …

Member Avatar for shaikh_mshariq
0
406
Member Avatar for WolfPack

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; …

Member Avatar for WolfPack
0
366
Member Avatar for jimtaylor

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" …

Member Avatar for jimtaylor
0
134
Member Avatar for crestaldin

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 …

Member Avatar for Nedals
0
5K
Member Avatar for supes32

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 …

Member Avatar for iamthwee
0
210
Member Avatar for vamsi_rgiit

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.

Member Avatar for Narue
0
93
Member Avatar for fitfool

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!

Member Avatar for fitfool
0
126
Member Avatar for gampalu

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

Member Avatar for Narue
0
248
Member Avatar for JoBe

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 …

Member Avatar for JoBe
0
86
Member Avatar for bmarzouk

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 …

Member Avatar for whatisid
0
341
Member Avatar for Arvinth

Hi My problem reqs a simulation code ( *.exe), which shd read the inputs from a file ( *.in) and after calculations , write the results to an output file ( *.out) .The names of the input and output files are hardcoded. I shd be able to execute my sim …

Member Avatar for Arvinth
0
323
Member Avatar for jcrcarmo

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 …

0
90
Member Avatar for hiten_1984

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 …

Member Avatar for hiten_1984
0
130
Member Avatar for BobGoolay

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 …

Member Avatar for Narue
-1
950
Member Avatar for krishsakura

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 …

0
60
Member Avatar for tyczj

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 …

Member Avatar for iamthwee
0
1K
Member Avatar for Coach_Nate

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 …

Member Avatar for Narue
0
137
Member Avatar for souphmars

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

Member Avatar for WolfPack
0
58
Member Avatar for AhmedHan

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 …

Member Avatar for jwenting
0
254
Member Avatar for augie0216

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

Member Avatar for f1 fan
0
100
Member Avatar for jcrcarmo

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 …

Member Avatar for f1 fan
0
159
Member Avatar for stupidenator

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 …

Member Avatar for stupidenator
0
170
Member Avatar for Nedals

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 …

Member Avatar for Nedals
0
955
Member Avatar for fsloke

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 …

Member Avatar for Salem
0
340
Member Avatar for btech

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 …

Member Avatar for Salem
0
138
Member Avatar for MrBrilliant

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

Member Avatar for MrBrilliant
0
246

The End.