49,757 Topics

Member Avatar for
Member Avatar for Masood Ali

Hi All. I am developing a C++ application which has a module to read data from a text file and then write some its data into another text file and then save that. Everything goes right tilll the last line of the program when I end up writing and try …

Member Avatar for Salem
0
90
Member Avatar for Tight_Coder_Ex

Using VC++ 6.0, setting this option doesn't seem to do anything significant. Specically, I can still run the app on a 486. I've drilled into assembly and can't find anywhere that Pentium opcodes are being used. My guess would be timing and as I don't have any references to that …

Member Avatar for WaltP
0
141
Member Avatar for n.aggel

hi, i use the flex tool {[URL="http://www.gnu.org/software/flex/manual/"]http://www.gnu.org/software/flex/manual/[/URL]} to generate a tokenizer ,but i have the following problem {it has to do with the way that flex tokenizes the input:: FILE : flex.l [CODE] %{ #define WEB 0 #define SPACE 1 #define STRING 2 %} string_component [0-9a-zA-Z \t\.!#$%^&()*@_] %% "daniweb" {return …

Member Avatar for n.aggel
0
189
Member Avatar for angelfox

i know this is 2 easy for you guys, but please help..... Its been only 2 wks since i enrolled this class and they gave me this assignment.... please check if its correct. thank you so much [code=cpp] #include<iostream> using namespace std; char vowels[]={a,e,i,o,u}; char n; char main() { cout<<“Please …

Member Avatar for angelfox
0
167
Member Avatar for Duki

Hey everyone, I'm back in C++ this semester; Last semester I went through Structured C++ (and passed with a 4.0; many thanks to all of you!) and this semester I'm in OOP. I don't have sample code yet because I haven't started. But I was talking to a classmate, and …

Member Avatar for Duki
0
218
Member Avatar for Ken JS
Member Avatar for Dave Sinkula
0
135
Member Avatar for palaka

[code=cpp]#include <iostream> using namespace std; int main() { char b; char john [6] = {'a','e','i','o','u','\0'}; cout<<"Please type a letter:"; cin>>b;} } [/code] please complete this code. i need to use an array that will give an output telling that your input letter is a vowel or consonant.

Member Avatar for iamthwee
0
99
Member Avatar for jaepi

Hello there, I'm having trouble finding the corresponding linux function of win32's SetFilePointer(), ReadFile() and WriteFile(). Do anybody here have any ideas on what to replace or use. Thanks. :)

Member Avatar for Ancient Dragon
0
38
Member Avatar for Ken JS

Is there a way to check how many errors can this code detect and correct??? | 1 0 0 1 1 | | 0 1 0 1 2 | = G | 0 0 1 1 3 | lot of help ken js

Member Avatar for Ken JS
0
83
Member Avatar for Ken JS

Hi, e.g. int a = 20; int b = 07; I want to joint a and b together to get 2007. Anybody know how to do it? lots of help, ken js

Member Avatar for Ken JS
0
133
Member Avatar for joydsouza90

How do you clear a string in a single statement ? for egs. i want to clear name[20] of all its contents and leave it completely empty Please help :-/

Member Avatar for WaltP
0
9K
Member Avatar for icetux

Hey, I am a total newbie I need help finding errors in my code. [CODE] // Week 4 Individual Assignment // Calculate the monthly payment User input. // Include header files #include <iostream> #include <iomanip> #include <math.h> using std::cout; using std::endl; using std::cin; using std::ios; //Namespaces using namespace std; //Declare …

Member Avatar for icetux
0
125
Member Avatar for WhYuLoOkIn

HI, I am working a program for an Aquarium which contains controls for lights and a electronic fish feeder. I have found a way to get the system time but I do not have the desired result. [1] I want to be able to set the system time during run …

Member Avatar for Ancient Dragon
0
119
Member Avatar for nayr055

[code]The program code works but after I add, subtract, multiply or divide two numbers the program exits automatically. I don't know how to keep it not to exit automatically, kindly see the code guys. thanks #include <iostream.h> #include <conio.h> int mc(int x, int y) //Multiply two numbers { cout <<"\n\n"<< …

Member Avatar for Hamrick
0
183
Member Avatar for shannonpaul

I need to display 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 … I “must” use the “for” …This is what I have but it only counts by two. I don’t want the answer…however can you please give me some clues on the proper way to add the …

Member Avatar for ndeniche
0
122
Member Avatar for goldbew

Hello..I am sorry if this is covered some where in threads I have not found. But I am looking for a good book or tutorial on how to use the Above IDE. I have some good C++ books, but now I need to start using the IDE. Any suggestions...thanks

Member Avatar for Dave Sinkula
0
27
Member Avatar for patrick210

Let me start by saying this is my first post here at daniweb and I am pretty new at C++. With that said I will dive right in. I have a program due next week and trying to get it hammered out. I have to create a line editor that …

Member Avatar for Bench
0
132
Member Avatar for fhshockey05d

I need to set up a serial communications port using DEV C++ to the CMUcam2 under windows. I have to send small strings such as "GH" "GM" and receive packets of information of varying sizes that will need to be parsed to analyze the information given. I've found some code …

0
65
Member Avatar for aruna

can any one help me? is main() function a pre defined function or a user defined function? thank you

Member Avatar for vijayan121
0
83
Member Avatar for Arctic wolf

Hello, I did some expiremets with turning numbers with floating point to strings and vice versa,and bumped into something strange,here is the code: [code=cplusplus] #include<stdio.h> #include<conio.h> #include<stdlib.h> void main () { double num; num=310.589; char buffer [10]; sprintf(buffer,"%f",num); buffer[7]=NULL; printf("using &num=\n"); printf((char *)&num); printf("\nbuffer=\n"); printf(buffer); printf("\nfragment of buffer=\n"); printf((char *)&buffer[3]); …

Member Avatar for vijayan121
0
711
Member Avatar for tonyaim83

I m reading a text file which is of format L1,L2,L3 L1,0,0,0 L2,1,0,0 L3,1,0,0 using getline method. The first lines signifies the vertex of a graph. Now from the second line onwards it signifies edges. Now from second line onwards i want to add the elements in a dynamic array …

Member Avatar for vijayan121
0
130
Member Avatar for kazek

I have this dictionary project that's making my head spin. Am trying to create a dictionary that stores the word and meaning of the word in a text file. Then a user can either searching the meaning of a word or search by alphabet. I had an idea which is, …

Member Avatar for kazek
0
2K
Member Avatar for qaiser

writa a code in c++ create a link list that will store information note{item code,item name,item price,intem quantity} add record print all search exit and delete

Member Avatar for iamthwee
-1
65
Member Avatar for tonyaim83

How do i create a two dimensional dynamic array of type string using vector. Also let me know if how can i use "find" on this array..

Member Avatar for iamthwee
0
125
Member Avatar for Darnie
Member Avatar for vaisakhpaacet

Can anybody help me to create a notepad like interface in C++. It should have a cursor which moves as we move the arrow keys.

Member Avatar for Ancient Dragon
0
73
Member Avatar for Ahmed Padela

Hi, I tried to compile below program with Borland C++ 5.0 program but i received subject error. Below is not complete program as it is long program. I think "graphics.h" has some problem. Please help me. [COLOR=#000000]#include<iostream.h>[/COLOR] [COLOR=#000000]#include<graphics.h>[/COLOR] [COLOR=#000000]#include<stdio.h>[/COLOR] [COLOR=#000000]#include<conio.h>[/COLOR] [COLOR=#000000]#include<string.h>[/COLOR] [COLOR=#000000]#include<dos.h>[/COLOR] [COLOR=#000000]#include<iomanip.h>[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]struct date_rec[/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=#000000]short int …

Member Avatar for jwenting
0
221
Member Avatar for Ahmed Padela

After compiling of below program , i received the "ms with error". Please help me. Thank you, [code=c] #include<iostream.h> void main() { int a[3][3],i,j,m,n,sum1=0,sum2=0,z; cout<<"\n Enter the order of the matrices"; cin>>m>>n; cout<<"\n Enter the elements of the matrices"; for(i=0;i<m;i++) for(j=0;j<n;j++) { if(i==j) sum1+=a[i][j]; } for(i=0,j=n-1;i<m;i++,j--) { sum2+=a[i][j]; } cout<<"\n …

Member Avatar for iamthwee
0
67
Member Avatar for Ahmed Padela

Hi, Everybody. After compiling below program i am getting error" prg2(distance with error),Please help me to resolve. Thank you [code=c] #include<iostream.h> #include<conio.h> struct distance { int feet; int inches; }; distance length1,length2; void prnsum(int distance11,distance12); int main() { clrscr(); int distance,z; cout<<"Enter length1:"<<"\n"; cout<<"Feet:"; cin>>length1.feet; cout<<"\n"<<"Inches:"; cin>>length1.inches; cout<<"\n"<<"\n" <<"Enter length2:"<<"\n"; …

Member Avatar for iamthwee
0
185
Member Avatar for teddymon

I don't know how to declare the funtions before it reach the int main? [code=cplusplus] #include <iostream> #include <cstdlib> #include <fstream> using namespace std; //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void closeFile() { input.close(); } //----------------------------------------------------------------------------- // //----------------------------------------------------------------------------- void PressAnyKeyToContinue(void) { system("pause"); //pauses the system until you press a key system("cls"); //clears the …

Member Avatar for Salem
0
86

The End.