51,593 Topics

Member Avatar for
Member Avatar for krnekhelesh

I am making this program which checks if your floppy drive is ready or not. And so it has to check for say 20 seconds. And for this I want the program to run in the background. How do I do this? I am using Borland C++ and Turbo C++

Member Avatar for EZO
0
1K
Member Avatar for CPPRULZ

When a parameter in a function definition (for say class distance) is abc(distance a) and in the main you call this function and pass distance b, what is the relationship thereafter between distance a and b? Do there adresses become equal-if so what implications does that have in the program?

Member Avatar for CPPRULZ
0
119
Member Avatar for Ontonyx

Ok, This program is designed to output sides and angles of a triangle based upon a side and angle that is inputted by the user. When I run the program the lenghts of the sides that I receive make absolutely no sense..but when I do them in my calculator they …

Member Avatar for VernonDozier
0
128
Member Avatar for Ontonyx

Hi, I have written the below code and to finish my assignment I need to have this file save to "results.txt" and I also need the angles to come out as degrees in the output..I've tried several tutorials and I am really struggling with this..any help would be appreciated [code] …

Member Avatar for VernonDozier
0
105
Member Avatar for CPPRULZ

Hello I was researching the copy constructor and found this exampleo a website: [code=C++] #include <iostream> class Array { public: int size; int* data; Array(int size) : size(size), data(new int[size]) {} ~Array() { delete[] data; } }; int main() { Array first(20); first.data[0] = 25; { Array copy = first; …

Member Avatar for CPPRULZ
0
92
Member Avatar for serkan sendur

in C# if you add @ before your string literals the escape sequences are not processed, so : you can use : [CODE] @"c:\Docs\Source\a.txt" // rather than "c:\\Docs\\Source\\a.txt"[/CODE] is there any c++ equivalent of doing that? Thanks

Member Avatar for cikara21
0
163
Member Avatar for tones1986

Hey all. I have worked on this in a previous post, but because of the huge difference in work needed, i have reposted it here. First off, i created a project that would input data from keyboard of a student, this student had name,ssn,dob,school id information that was needed. After …

Member Avatar for tones1986
0
108
Member Avatar for number87

Hi guys I just wanna ask what is the difference between the mode_t and st_mode when using sys/stat.h and sys/types.h libraries. I looked them up google and find most people use st_mode but never mode_t.

Member Avatar for number87
0
99
Member Avatar for abby2589

fatal error C1004: unexpected end of file found what is that problem when this error shows?? what do i need to do?

Member Avatar for CrimsonTider
0
60
Member Avatar for CrimsonTider

Hey guys, I'm new to the forum and pretty new to C++. I think I'm just about finished with this project, but I've run into a couple problems. Here's my assignment: "Write class Lib and modify class Book such that this [URL="(http://cs.ua.edu/124/Spring2009/Projects/main.cpp)"]main[/URL] works as implied. For each class create .h …

Member Avatar for CrimsonTider
0
243
Member Avatar for christiangirl

Hey, So I got this program all working except some of the output is weird pictures instead of letters. The first time it outputs it works fine, but after that it only partly works. Here's the code: [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority …

Member Avatar for christiangirl
0
156
Member Avatar for soroushc

It's my assignment I have done almost I have completed it.But I have problem in getting input from user(the bank name)here is my assignment question. Customer often wait in the bank..!you have to ask the user the entire as many bank names as he desires and time (waiting time the …

Member Avatar for Stefano Mtangoo
0
168
Member Avatar for neoangin

Hi, I am trying to implement some code from MS VS 2008 Documentation. [QUOTE]To enable the user to draw filled shapes, include the following popup menu in your application.[/QUOTE] [CODE] POPUP "Filled &Shapes" { MENUITEM "&Ellipse", IDM_ELLIPSE MENUITEM "&Rectangle", IDM_RECTANGLE MENUITEM "R&oundRect", IDM_ROUNDRECT } [/CODE] I put in header: [CODE]#define …

0
63
Member Avatar for christiangirl

Hello, I have to make this program that has two queue's. It takes input from a file, and each line in the file has a number and character. If the number is a one, the character is stored in the highQueue. If it is a 2-5 it is stored in …

Member Avatar for Lerner
0
122
Member Avatar for TheKebab

Hi there! I'm working on this app that will allow you to encrypt or decrypt simple lines or entire txt files. It's no "real" encryption since it's easy to crack the output lines, but it's a fun project. So far I'm just done with the first option, and the funtions …

Member Avatar for TheKebab
0
165
Member Avatar for I_want_to_lean

I have an app which i draw a PNG on the button and all works great until i want to redraw the whole screen. when i try to redraw the whole screen it gives me an exception and points to this part of afxwin2.h [code]_AFXWIN_INLINE CDC* CWnd::GetDC() { ASSERT(::IsWindow(m_hWnd)); return …

Member Avatar for I_want_to_lean
0
264
Member Avatar for xtremerocker

[CODE=cplusplus] #include <iostream> #include <sstream> #include <string> #include <fstream> using namespace std; int main(void) { for(int COUNT = 0; COUNT <= 1000; COUNT++) { if(COUNT > 1000) { break; } if(COUNT <= 1000) { std::string TO_STRING; std::stringstream OUTPUT; OUTPUT << COUNT; TO_STRING = OUTPUT.str(); ofstream myfile; FILE.open ("data.txt"); FILE << …

Member Avatar for xtremerocker
0
123
Member Avatar for PradeepChandra

Can any body tell me how to fetch data from a SQL table using SELECT statement in VC++ (MFC app)

Member Avatar for Nick Evan
0
47
Member Avatar for neoangin

Quick one about API: There is advice in MS Visual Studio 2008 Documentation: "To enable the user to draw filled shapes, include the following popup menu in your application. POPUP "Filled &Shapes" { MENUITEM "&Ellipse", IDM_ELLIPSE MENUITEM "&Rectangle", IDM_RECTANGLE MENUITEM "R&oundRect", IDM_ROUNDRECT } " Hm... where? In WinMain or between …

Member Avatar for Freaky_Chris
0
88
Member Avatar for serkan sendur

Hi guys, i want to achieve the same thing below in C++ and C, is it doable? Dont get me wrong, i dont want to create a web application, i just want to get an index number of enum by specifying a string value. [CODE]//Default.aspx : <%@ Page Language="C#" AutoEventWireup="true" …

Member Avatar for jencas
0
1K
Member Avatar for datenshi

Write a program that immplements a pointer based linked list with the following functions: a. Construct/ constructor b.empty c. dispaly a node/ search d.display all nodes e. delate a node f. delete all nodes g. insert a node The program displays a menu of operations below. string AuthorTitle; int BookCode; …

Member Avatar for Freaky_Chris
0
171
Member Avatar for smithss

Hi guys, I wrote a program which used an external library. i was asked to include a .h file for compiling and link with the '.lib' while linking. I don't understand the reasons behind all this? Can someone explain? 1>What happens when i include the .h and link with the …

Member Avatar for Nick Evan
0
174
Member Avatar for number87

hi guys its my first time doing a c++ program to manipulate shell input I need to create a c++ program which reads input from this unix shell command >> ls -ali and then im supposed to count the number of dir,write files. I am not allowed to use the …

Member Avatar for Agni
0
247
Member Avatar for PradeepChandra

i am trying to place a bitmap image on a cbuton by using setBitmap() function, it is not showing up. kindly assist.

Member Avatar for PradeepChandra
0
72
Member Avatar for MyRedz

hi i got my second assigment here for oop in c++. but i don't understand clearly. can anyone explain it to me? [QUOTE] ASSIGNMENT 2 INTRODUCTION TO CLASS [15 marks] Objective: 1.Learn how to write class which uses dynamic memory allocation 2. Learn how to invoke member function/send message to …

Member Avatar for VernonDozier
0
99
Member Avatar for gshock2006

Right now, I want to handle data file in the following format: apple 1234 coke 2344 some grape 2345 null .... as some lines consist of 3 element while some other have 2,I want to use the expression as follows to get the first two elements in every line and …

Member Avatar for gshock2006
0
112
Member Avatar for rosenberg_a

I got a problem that is not for homework in the book. It states... "Total Template Write a template for a function called total. The function should keep a running total of values entered by the user, then return the total. The argument sent into the function should be the …

Member Avatar for rosenberg_a
1
574
Member Avatar for winrawr

So, supposing I do manage to compile a DLL with exports, how does the DLL work with my code? How would I check for the DLL on the system, and then, how would I link to it? Also, Can a DLL written in C++ be used in a VB application? …

Member Avatar for Freaky_Chris
0
92
Member Avatar for moiseszaragoza

I was wondering how would i make a call to a function inside my C# code with out reloading the page from inside Flash? Thanks

Member Avatar for serkan sendur
0
48
Member Avatar for jake88

Hello, I've parsed, read and edited an xml file. But when I write the output file I get a mashed up xml output. I would like to know if there is anyway to pretty print and output .xml file, like the DOMPrint example does on the cmd prmpt. Thanks

Member Avatar for jake88
0
217
Member Avatar for fusi0n423

My Project is to create a MaxHeap priority queue to sort voters. Everything compiles fine but the linker gives me a wierd error: [code=c++]1>Main.obj : error LNK2019: unresolved external symbol "public: __thiscall MaxHeap<class Voter,class SalaryCompare>::MaxHeap<class Voter,class SalaryCompare>(class Voter * * const,int,int)" (??0?$MaxHeap@VVoter@@VSalaryCompare@@@@QAE@QAPAVVoter@@HH@Z) referenced in function _main[/code] Anyone have any ideas? …

Member Avatar for fusi0n423
0
90
Member Avatar for niranjan.quasar

What is Broken Inheritence in OOP ? What are the reasons for it ? How can we correct such a problem ?

Member Avatar for sidatra79
0
78
Member Avatar for tones1986

Hey all. I am using visual studio 2008 for the first time because i have heard very good things about it (plus i had numerous problems with devc++). Here is a debug.html file that shows an error i am getting while trying to compile my project in visual studio. i …

Member Avatar for tones1986
0
203
Member Avatar for kunal123

i m using visual studio .net 2003 vc++ mfc i cannot connect to sql server SQLSetEnvAttr() is returning null value everytime i hv used retcode = SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, (void *) SQL_OV_ODBC3, 0); pls help !!

Member Avatar for kunal123
0
134
Member Avatar for gshock2006

Hi,guys, I am new to C++,and recently I practice to read a file with visual studio 9.0,but it turns out that it cannot find the very file! [code] #include<iostream> #include<fstream> #include<string> #include<iomanip> #include<cstdlib> #include<vector> using namespace std; //using namespace stdext; int main() { ifstream inClientFile("Dic.dat",ios::in); if(!inClientFile) { cerr<<"File could not …

Member Avatar for gshock2006
0
245
Member Avatar for Ciganjo

hi im having alot of trouble with this particular code the idea is to read text from a file and print it on screen, i have done that. Next i needed to ouput the longest word onto the screen, this i have done also The bit im stuck with: I …

Member Avatar for h3xc0de
0
319
Member Avatar for massivefermion

Hey men When i wanna run the code below,i get the famouse [I]don't send[/I] message and i use code::blocks 8.02 [CODE]#include <conio.h> #include <iostream> using namespace std; int main(){ int start,end; double a[start-end][2],p[start-end]; cout<<"Enter a number to begin with : "; cin>>start; cout<<"Enter a number to finish with : "; …

Member Avatar for massivefermion
0
388
Member Avatar for williamjoseph

hai everyone i need the program in c++ for merge list using date structure? <snip fake signature>

Member Avatar for ithelp
0
145
Member Avatar for liphoso
Member Avatar for Comatose
0
46
Member Avatar for ACRobison02

I have to create a structure array that contains the title, director, year made, and run time of a list of 4 movies. Then I need to create a function to display the contents of the array. Then ask the user what movie they'd like to search for. Create a …

Member Avatar for ACRobison02
0
121
Member Avatar for liphoso

I am concidering learning C++, can anyone help me find a freely downloadable book for C++. Thnx in advance

Member Avatar for Agni
0
45
Member Avatar for gulad75

Write a Program that models a simple calculator. Each data entry line should consist of a valid operator (from the list below), and the right-hand operand. Assume that the left-hand operand is the accumulated value in the calculator, with an initial value of 0.0. Acceptable operators: + ..Add - ..Subtract …

Member Avatar for Freaky_Chris
0
185
Member Avatar for soroushc

how to get a string using array? and how can I get input in this format string|12.3 12.23 | example;with no space between the lines and when user enter 0 it will exit david|12.3 24.2| Peter|12.4 24.2|

Member Avatar for VernonDozier
0
111
Member Avatar for csurage

I am doing independent research for a professor of mine, but I'm not sure where to start. I plan to write this application in c++. 1) The application will run on a server and the main computer will be able to monitor the computers in the lab, for example the …

Member Avatar for Nick Evan
0
107
Member Avatar for xtremerocker

I'm currently working on ProjectEuler.net's problem no. 39 and it states "If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p <= 1000, is the number of solutions …

Member Avatar for xtremerocker
1
127
Member Avatar for shadowfire36

i was giving an assignemnt to show stacks with out using the STL . my question is is my code a correct example or not ? and if so can some some one guide or explain to me what i did wrong or what i need to change [code] #include …

Member Avatar for Salem
0
149
Member Avatar for shadowfire36

im doing this example project, but i cant seem to figure out why visual studio 2008 keeps giving me error C2075-'Target of operator new()' : array initialization needs curly braces. it says the error is on line 47 [code="cpp"] #include <stdio.h> #include <string> #include <vector> class Foo { std::string _str; …

Member Avatar for kbshibukumar
0
624
Member Avatar for christiangirl

Hey, I am having trouble with the file I/O part of this program. It seems to start at the end of the files contents and not go into the while loop. [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority * * Takes input from file …

Member Avatar for cikara21
0
156
Member Avatar for shanir13

I Have been working on this for a few days now, and I seem to be missing something. What I have to do is: > Design a C# solution with a Main ( ) method that holds an integer variable named seconds to which you will assign a value. Create …

Member Avatar for slap1914
0
330
Member Avatar for mumblejum

I need to write a C++ program. I'm usually pretty decent with C++ but with this one I'm lost. I have to write a program that basically checks to make sure that the braces creating a block in a cpp file are balanced. I'm not looking for anyone to write …

Member Avatar for StuXYZ
0
441

The End.