51,593 Topics

Member Avatar for
Member Avatar for asif.ishaq

Hi, Please let me know if anybody knows that how to get schema information of a table (e.g. columns name,data type, key columns.. etc) using c++.I don't want to use system tables query and things like that.I was searching on the net and found CIndexes and other classes but not …

Member Avatar for Ancient Dragon
0
385
Member Avatar for timdog345

[code] //pg 368 #1 /* void initialize (double& h, double& r) { h=0; r=0; } void getHoursRate (double& h, double& r) { cout<<"please enter how many hours you worked. "; cin>>h; cout<<endl; cout<<"please enter your rate. "; cin>>r; cout<<endl; } double paycheck (double h, double r) { double overTime, finalAmount=0, …

Member Avatar for Nick Evan
0
131
Member Avatar for vijaymmathews

hi how to make a vc++ application run inside a web browser is there any possible ways to work the vc++ application inside the browser as if we are browsing plese provide me information and assistance for the above question

Member Avatar for hollystyles
0
77
Member Avatar for BAEdwards

I am just posting in the hopes that somenone can explain a problem I seem to be having with Turbo C++. My application basically has two forms (Form1 and Form2). Form1 is the main form and Form2 is created dynamically, as the result of a button click event, from Form1 …

Member Avatar for thekashyap
0
168
Member Avatar for shankhs

hey I want to input a string that contain spaces such as "My name is Shankhs"; i initialized a string str; then cin>>str; but str is not taking words after spaces as if spaces are acting as a delimiter... i tried gets,getline but they does not seem to work for …

Member Avatar for shankhs
0
101
Member Avatar for zawpai

Hi, Could anyone please check my sample code? I am a beginner in C++. This code is for file comparison. Whenever I run it, the compiling result is always "Usage: compiles <file1> <file2>". I think something is wrong. Please give me some suggestions how to go through the code. Best …

Member Avatar for mitrmkar
0
160
Member Avatar for bhoot_jb

i am writing a code for a stack within stack...or nested stack...whatever.. in the code..and the mainstack is a stack of substack, which in turn, is a stack of integer data.. i thought of using class template for both the stacks - mainstack and substack..but am confused with how to …

0
59
Member Avatar for bindiK

Hi, I need solution to this immediately. Can somebdy suggest what needs to be done in the following program: Write functions OpenFile and DisplayColumns: OpenFile syntax: void OpenFile(const char *fileName, ifstream &inFile); Parameters: fileName - a pointer to the name of the file to be opened inFile - a reference …

Member Avatar for Nick Evan
0
128
Member Avatar for toolbox03

The problem is with this line inCustomerDetails[i].getCustomerProduct(productName, productID, unitCost, quantityPurchased, x); data.txt 5 Angie Ang S1234567 Y 4 Choco P0001 5.50 2 Rice P0002 10.00 1 Bread P0003 2.00 1 Chicken P0004 7.50 1 program code [code=cplusplus] #include <iostream> #include <fstream> #include <string> #include <algorithm> using namespace std; class Product …

Member Avatar for Nick Evan
0
146
Member Avatar for cobaltbass

I'm having a little trouble with some code. I'm writing a library management program. I need to be able to input title, author, isbn, etc. in the program. When the program asks for the isbn it behaves as expected. When I enter any words the program terminates, but if I …

Member Avatar for Nick Evan
0
111
Member Avatar for Hockeyfreak889

I need to make a program that outputs a random number between 1 and 10 every half of a second. Right now i dont know how to generate random numbers or use a timer so i need lots of helf here.

Member Avatar for Ancient Dragon
0
93
Member Avatar for C-+

I am having a problem trying to divide a number. So in my in my program I have a number and I want it to divide it by 10. The problem is that the result is going to be decimal. I run my program I put the number it divdes …

Member Avatar for n1337
0
140
Member Avatar for Lukezzz

I want to delete a Folder that consist of .txt Files. I am trying with this code below but the member :: Delete says that it only can emty an emty folder but this folder contains .txt files. So I wonder what other technique could be used ? [code] System::IO::Directory::Delete( …

Member Avatar for Lukezzz
0
209
Member Avatar for calichik

I need help with a RetailStore class. The class is supposed to do this Design and implement a class named RetailStore that holds data about an item in a retail store. The class should have the following private data members: 1. name - a string that holds the name of …

Member Avatar for calichik
0
102
Member Avatar for Magic Hands

I am wondering if there is a way to read an audio file to determine when the beat is greater than a given Hz? Such as every time the bass drum hits it will tell me. I do not have any code yet, I know how to play a simple …

Member Avatar for Magic Hands
0
86
Member Avatar for Jennifer84

This code Gets the last Write Time from a .txt file. My Question here. [B]1.[/B] When doing that operation. Will this file be opened or is the file closed ? [B]2. [/B]If the file was opened will the file Close automatically after the Check ? [code] CurrentSourceTime = System::IO::File::GetLastWriteTime(SourcePath); [/code] …

Member Avatar for Jennifer84
0
215
Member Avatar for h_ghoor

im a beginer in C and im writing a program that ables the user to repeatedly enter positive and integers, until the user enters a value <=0. Then prints the min and max value entered. I wrote the program but for some reason the min and max functions that i …

Member Avatar for VernonDozier
0
94
Member Avatar for Sairobi

okay I need to write a program that will basically be pulling strings from a text file based on what the user inputs. I can make a program run that gets the text file to input to the screen but I am having trouble with jumping around the file. example: …

Member Avatar for Sairobi
0
88
Member Avatar for Cybulski

I'm starting writing class that should read configuration file and initialize some members with data from file. I decided to read this file in constructor. What should constructor do, if something goes wrong, and further construction of object have no sense? For now it displays message: [code] MultiReader::MultiReader(const char* m_sPath) …

Member Avatar for Cybulski
0
98
Member Avatar for QuantNeeds

The following is my code. I am just getting started in C++ so there are few concepts I am still stuck on. This program works well except for one issue – the data type is integer but it is not catching decimal numbers. In my other programs this worked but …

Member Avatar for n1337
0
81
Member Avatar for nanodano

Hi, I'm trying to write a program using named pipes, and I'm having trouble opening it. In another program I call this line: [code] mkfifo("./fife", 0777); [/code] So my named pipe exists and I see it in my list of files. Then I run the program I included below, but …

Member Avatar for Salem
0
185
Member Avatar for mghmgh

I need to write a program that read of input a number N numbric & calculate N! that's number (should be simulator of multiply into program because us want number N ) & should be Number of character for e.g char s[20].

Member Avatar for n1337
0
295
Member Avatar for peachslasher

Hey guys, I need to write a C++ program that use to compare sorting algorithm. I've tried to implement counter on each of <.>, = operations I've encounter in the function (currently i am working on selection sort), however the sum of the counter doesn't really match big O selection …

Member Avatar for Radical Edward
0
281
Member Avatar for dan_e6

hey guys. ive been asked to do this: Write a recursive function which returns true if the linked list is sorted in ascending order. bool isSorted(nodeType *L) why would we use a recursive function to check if it's in ascending order? can anyone help me with this.

Member Avatar for n1337
0
466
Member Avatar for wellibedamned

i'm trying to get the last word of the sentence using strtok.. i tried this :[CODE]while (tok != NULL) { tok = strtok (NULL, " "); if((tok != NULL) && (strtok(NULL, " ")==NULL)) printf("%s", tok); }[/CODE] kinda doesn't work... anyone knows why? Yes, tok is a char * pointer..

Member Avatar for Nick Evan
0
82
Member Avatar for timdog345

[code] //test SAT /* void initialize (int& verbal, int& writing, int& math) { verbal=0; writing=0; math=0; } void userInitialize (int& verbal, int& writing, int& math) { cout<<"Please enter your verbal score (0-800) "; cin>>verbal; cout<<endl; cout<<"Please enter your writing score (0-800)"; cin>>writing; cout<<endl; cout<<"Please enter your math score (0-800)"; cin>>math; …

Member Avatar for Nick Evan
0
146
Member Avatar for qt.alan

i am trying to load the morsecode.txt into my tree struct but when i compile it i keep getting this errors error C2440: '=' : cannot convert from 'decode *' to 'int *'| error C2664: 'bintree<dataType>::insert' : cannot convert parameter 1 from 'int' to 'const decode &'| error C2676: binary …

Member Avatar for mitrmkar
0
158
Member Avatar for e_pech

Hey! I need to write a compiler for a microcontroller I'm designing... I want to use MFC to check the Syntax. I created a project in wich the View is derived from the RichEditView, Can anyone help me get info on how I can accomplish this?? I need to check …

Member Avatar for e_pech
0
102
Member Avatar for FTProtocol

Im just beginning to learn c++ and this is about the second day. Just wondering what you guys think and ways of improvement, efficiency and such. Thanks guys! [CODE] /* Super Simple Calculator - Created By FTProtocol */ #include <iostream> #include <math.h> #include <stdio.h> #include <windows.h> #define nl '\n' int …

Member Avatar for Nick Evan
0
148
Member Avatar for FTProtocol

Do you guys have any idea where I've gone wrong? [CODE] /* Super Simple Calculator V3.0 - Created By FTProtocol */ #include <iostream> #include <math.h> #include <stdio.h> #include <windows.h> #include <conio.h> #define nl '\n' #define PI 3.14159265 const double a=5; const double b=3; const double c=8; int x,y,choice; int ans=0; …

Member Avatar for Nick Evan
0
113
Member Avatar for MAD_DOG

Let me ask you guys something what is the toughest type of Programming Language on techtalk?

Member Avatar for azwiz
0
336
Member Avatar for allwiyn

[B]Hi, How to write a function that checks if the circle passes through given four points.. please answer this with code or just give me the logic and concept of writing this...[/B]

Member Avatar for VernonDozier
0
110
Member Avatar for Jennifer84

I have push_back(ed) Lines in 6 "places"/for 6 elements lika below in a 2D vector. So each element of the 6 consist of different many "MainLines". So when I am trying to get these out in the OutPut, I know I will use any kind of ::iterator and knowing begin() …

Member Avatar for John A
0
96
Member Avatar for Miyamoto

Why inheritance requires virtual functions? I read this from a book : Because inheritance generally requires the use of one or more virtual functions (a virtual destructor if nothing else), you don't want any hierarchy for small, heavily used objects. Thank you

Member Avatar for Duoas
0
90
Member Avatar for savinki

Hi, I want to assign a char pointer value to enmerated value, to use in a switch statement. Given below is the code segment. I dont hv an idea how to convert and assign char pointer value to a enumerated value. Pls can someone help me to resolve this [code=cplusplus] …

Member Avatar for Duoas
0
156
Member Avatar for fusi0n423

I'm working on a lineEditor class (doubly linked list) and I'm switching it from using std::string to a template but I keep getting: lineeditor.cpp(33) : error C2143: syntax error : missing ';' before '*' when compiling. The code is: [code=c++] template <class T> int lineEditor<T>::getSize() { return maxLineCount; } template …

Member Avatar for Duoas
0
110
Member Avatar for Nemoticchigga

Is there a way to make a visual studio 2005 form repaint itself every 'x' number of milliseconds? Thanks.

Member Avatar for Nemoticchigga
0
55
Member Avatar for Jennifer84

I am doing a loop that will run all the time and when a change is done to the File(Source), then this file will be Copied/OverWrite file(Dest). One problem that I have is that the if-statement that says: [B]if( CurrentSourceTime != LastSourceTime ) {}[/B] is running each loop ? I …

Member Avatar for Jennifer84
0
109
Member Avatar for lahom

[B]hi i have this function:[/B]Public Function GetFile(Filename As String) [CODE]Dim path As String Dim Fnum As Integer '---read file in one pass! Fnum = FreeFile Open Filename For Input As #Fnum GetFile = Input(LOF(Fnum), Fnum) Close Fnum Exit Function ErrorHandler: Err.Description = "GetFile: " &amp; Err.Description &amp; " -&gt; " …

Member Avatar for mitrmkar
0
275
Member Avatar for xyinyangx

I am in a c++ programming class in my High School, and I am having some trouble with the final I was assigned. We were assigned to make a video game, so I decided to make a text adventure. My code is basically a bunch of if statements telling the …

Member Avatar for xyinyangx
0
764
Member Avatar for scarface3288

This is the file I will be calling from, basically it stores something into a file called "temp.txt, so let's assume that it works and the problem is not here. This is the "file.h" file. [CODE]#include <iostream.h> #include <fstream.h> #include <string.h> #include <stdlib.h> ofstream output_file("temp.txt", ios::out); class NUM_STUD: { public: …

Member Avatar for scarface3288
0
102
Member Avatar for Kob0724

I"ll preface this with the fact I'm pretty new to C++ (my background is in Java, so having to deal with these pointers is proving to be a little confusing). I'm trying to iterate through a vector that I passed to a function. I can't get this code to work …

Member Avatar for Kob0724
0
271
Member Avatar for daviddoria

This doesn't seem to behave as I would expect (as it does in matlab, for example). I want to execute a command, but give some readable output instead of the often very messy auto-generated error (index out of range or something). [code] try { MyFunction(1,2); } catch(char* str) { cout …

Member Avatar for daviddoria
0
93
Member Avatar for sash007

A programme in C++ that if date is input it tells day? For example Enter Date : 1-01-1985 The day is 'Monday' Enter Date : 2-01-1985 The day is 'Tuesday' Restriictions are using If-else, switch,operators(/,%,*,+,-) while loop.logical operations(&& || ) Please write the programme or Explain the logic It starts …

Member Avatar for sash007
0
134
Member Avatar for Nemoticchigga

I am doing a windows forms application in Visual Studio 2005. I have all the forms, as well as some additional classes in source files for data storage. I was wondering how to update data in one class based on another class. Does this need to be done through a …

Member Avatar for Duoas
0
104
Member Avatar for Lukezzz

I am using VC++ 2008 and wonder, that if I have made a project. "Windows Forms Application" that only consist of an Emty Form. I wonder how it is possible to Compile this so this will be an application. I have searched around in the properties and found something called …

Member Avatar for Lukezzz
0
122
Member Avatar for dophine

Hi all, there is a big project which consists of different folders and makefile. I want to build just part of the project using eclipse since every time I build is to build the whole project. Is there anyone knowing how to do?

0
50
Member Avatar for Beemer

Hi all I have written a program to issue a bursary according to the amount of modules passed in 2007 and the amount registered for in 2008 , basically if the student did not pass any modules in 2007 :no bursary if the student passed 1 or 2 modules in …

Member Avatar for Salem
0
103
Member Avatar for usmanabb

it says two teams A & B have to play a match, and we have to find probability of team A. I can't understand the way to calculate its percentage. The main points are: 1) the match is played by two teams: A and B; 2) the first team to …

Member Avatar for usmanabb
0
730
Member Avatar for blackbeard

I have an assignment to make a text-based snakes and ladders game using Dev-C++. I have so far made a splash screen and a menu (with colours and sounds, pretty cool) using the winmm.a library and the switch/case construct. I have even been able to get player names with a …

Member Avatar for blackbeard
0
1K

The End.