51,593 Topics

Member Avatar for
Member Avatar for taha umar

Write a program that calculates the average marks of three subjects of a student, entered by the user through keyboard and store them in three different float variables having names marks_subject1, marks_subject2, marks_subject3 The formula to calculate the average is: average = (marks_subject1 + marks_subject2 + marks_subject3) / 3 Your …

Member Avatar for perniciosus
0
168
Member Avatar for bucsoldier03

I have to develop a C++ program that reads the data records from the input file and stores them in a dynamic array of structs, which should be sized just enough for the problem. (TIP: Your program should first scan the input file to determine the number of records to …

Member Avatar for dwks
0
156
Member Avatar for sahil_logic

[code] #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void palcheck(char str[]); char ans; char str[20]; do { cout<<"Enter the string to check if it is a palindrome. "; gets(str); palcheck(str); cout<<"\nEnter Y to continue. "; cin>>ans; }while (ans=='y'||ans=='Y'); } void palcheck(char str[]) { int l=0,k=0,flag; for(int i=0;str[i]!='\0';i++) l=l+1; k=l; for(int j=0;j<l/2;j++) …

Member Avatar for dwks
0
148
Member Avatar for smicer

Please can someone help me. i don't know where to start. i need to write a programme in c/C++. the features of the programme are stated below: Write a program for Windows XP that makes a countdown timer in your Tray (at the bottom of the screen). When you right …

Member Avatar for perniciosus
0
187
Member Avatar for pokerponcho

You created a bunch of random numbers, but say you don't want a bunch of random numbers exactly. Say you have ten members of a team and you want to give them a random position represented by 0 to 9. So you create your array and you fill it with …

Member Avatar for pokerponcho
0
245
Member Avatar for Analogsleeper

I have a program where I want to point the same ifstream to another file when I am done using it. Currently, I have it set up something like this (pseudocode): //Global File Name char *mmFileName[50] void calculateISI() { ifstream minmaxFS; //sets the global file name if(condition) setGlobalFileName(); while(//assume true) …

Member Avatar for Analogsleeper
0
474
Member Avatar for sahil_logic

#include<iostream.h> #include<conio.h> int main() { int a[5],loc,val,ans; do { cout<<" enter the elements "<<endl; for(int i=0;i<5;i++) cin>>a; cout<<" enter the location u want to edit with respect to zero "; cin>>loc; cout<<" enter the val to be inserted "; cin>>val; for(int j=6;j<0;j--) { if(j==loc) a[j]=val; else if(j>loc) a[j]=a[j-1]; } for(int …

Member Avatar for Asif_NSU
0
130
Member Avatar for love13chess

Hi guys: I am very very new in C++. In school they required me to write a program that reads the names of the students registered for a class and output that result in a file. I got almost everything done. The only problem is with the function getline. I …

Member Avatar for Dave Sinkula
0
133
Member Avatar for mym

This program uses an ancient method to find the square root. But the problem is that it only works with certain numbers not all the numbers I input. I would like to know if I am doing anything wrong. I would appreciate any help I could get with this. [code] …

Member Avatar for Rashakil Fol
0
208
Member Avatar for sahil_logic

hello everyone i was trying to make my own own string concatenation function but wasnt able to do so. i need ur help.

Member Avatar for Dave Sinkula
0
2K
Member Avatar for mtodd51

I just finished a simple slot machine program. It displays 3 random numbers from 0 - 9 next to each other. I'd like to "soup" it up. Is there some way I can make each of the the numbers spin and stop sequentially. thanks

Member Avatar for WolfPack
-1
653
Member Avatar for Acidburn

[code] { cout <<" file found ..." << endl; while((ch = infile.get()) !=' ' ) { cout <<"\nRead value is : "<< ch<<endl; cout << "calling function : "; populateArray(ch, i); } } [/code] file contents : if ( a + b ) ; basically its taking the file pointer …

Member Avatar for WolfPack
0
84
Member Avatar for Zababa

Hello there, guys! I am relatively new to programming in C, and I still have a lot to learn. I am currently using Dev C++, but I work in C only. My problem is that I need to fill a 2D table with some multi-character variables, and I don't know …

Member Avatar for jim mcnamara
0
415
Member Avatar for imanust

I am trying to output a number of lines, given by the user, of stars shaped as a triangle below: [code] ********* ******* ***** *** *[/code] i have got the following code: [CODE]void line (int n, char c) { for (int i = 1;i <= n; i++) { for (int …

Member Avatar for WolfPack
0
101
Member Avatar for johnray31

when i compile this program [CODE]main() { struct emp { char name[20]; float sal; }; struct emp e[10]; int i; for(i=0; i<=9; i++) scanf("%s %f", e[i].name, &e[i].sal); }[/CODE] it gives the Floating point formats not linked but when i run this [CODE]main() { float x; scanf("%f" , x); }[/CODE]<< moderator …

Member Avatar for johnray31
0
453
Member Avatar for jack223

Question: counts how many times the number 5 appears in array called NumArray? Can anybody help me with this problem?? I got 4 "5s" but i don't know if i understood the question correctly or not....does "55" counts as two 5s??? and if it does then how do i count …

Member Avatar for geekbutproud
0
2K
Member Avatar for kahaj

Can't get this to compile for some reason. Anyone have an idea what's going on with it? [code] #include <iostream.h> #include <stdlib.h> #include <iomanip.h> #include <time.h> void MoveT(int *tortoisePtr, const int End_race); void MoveHare(int *harePtr, const int End_race); void PrintCurrentPosition(const int *snapperPtr, const int *bunnyPtr, const int End_race); int main() …

Member Avatar for Dave Sinkula
0
240
Member Avatar for DotNetUser

I have created three timers(5sec,5sec, and 10sec) for my Windows gui. When the timer event is triggered, it displays an Timeout error to a textbox. For some reason, the timers doesn't trigger in some procedures but does in others. I don't believe any process is holding up the code to …

Member Avatar for DotNetUser
0
130
Member Avatar for BobbyT

Hi, For a project I have to make an app which changes the speed of a movie. I've used TactiveMovie and Moviegrabber. This changes the speed ok but the movie pauses when de speed is changed. Is there a component or a fix for this problem? I've tried to play …

0
67
Member Avatar for johnray31

[COLOR=Green] hello experts i am new to this programming field plz tell me how can i reverse a string without using any extra space . if someone could provide code it ll be great help for me thankx [/COLOR]

Member Avatar for Dave Sinkula
0
251
Member Avatar for siosavin

does anyone have a c++ source code that use getprocaddress and loadlibrary with preventing hook? << moderator edit: split thread ([url=http://www.daniweb.com/techtalkforums/showthread.php?t=4909]original[/url]) >>

0
67
Member Avatar for bluegoo06

Im trying to do a population vector assignment. I tried to comment my word so you know waht is going on . I am having trouble putting coefficents into a two dimensional vector array. So if you could give me hints on that it would be great. The code only …

Member Avatar for server_crash
0
132
Member Avatar for bucsoldier03

how do u write cin.get in c language and how to open and close files in c languauge

Member Avatar for jim mcnamara
0
120
Member Avatar for juusan

I'm a college student in a C++ class. I'm writing a program, and I get the follow error: [I][taz3] 3:36pm ~/c++ > gcc stustats-sjs.cpp -o stustats-sjs.app stustats-sjs.cpp: In function `int main()': stustats-sjs.cpp:64: ANSI C++ forbids using pointer to a function in arithmetic stustats-sjs.cpp:65: ANSI C++ forbids using pointer to a …

Member Avatar for juusan
0
230
Member Avatar for peter_budo

I'm getting following compile error OrderedList.cc: In member function `std::string OrderedList::find(std::string&, std::string&, int&)': OrderedList.cc:133: error: invalid conversion from `int' to `const char*' OrderedList.cc:133: error: initializing argument 1 of `std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' OrderedList.cc looks like this [CODE]string OrderedList::find(string& …

Member Avatar for SpS
0
182
Member Avatar for christyj5

I am trying to do an insertion sort that reads from a file it has it own class but i can not get the program to do anything it says no errors but crashes when i try to run [code]#include <string> using namespace std; class Student { public: string lastname; …

Member Avatar for jim mcnamara
0
253
Member Avatar for Dee_Dee

I have to write a program that will check each value in the array for a negative number then the program must either print "The array has no negative values" or "The array has at least one negative value". We have to use the funcion anynegatives(int a[], int arraysize) This …

Member Avatar for SpS
0
267
Member Avatar for Hisham4FCI

hello all it is my first time here to post :cheesy: well i hope i'm welcomed here my problem is i want to read binary file and view it on the console two times [CODE] #include<iostream> #include<fstream> using namespace std; class Student { private: char name[20]; char address[80]; int age; …

Member Avatar for Lerner
0
205
Member Avatar for new guy n c++

HI all; i'm a new in c++ programing and i have some problem that i don't know how to fix it. i have been trying to fix it for severaldays and i it isn't working. can u help me please. this is my program which is A file contains 7 …

Member Avatar for Lerner
0
425
Member Avatar for micropower99

Hey guys, I'm new here, seeing as this is a C++ forum I was wondering if someone could help me out with a C++ assignment I have. I need to make a word counting program. Here is what I need: [url]http://desertonline.net/classes/cs89a/zbecker/files/Assignments/WordCount.htm[/url] Username: cs89a password: ctwo Anyone who completes this project …

Member Avatar for SpS
0
217
Member Avatar for geeta

Hi, i hve asimple c++ prog written in vc++ editor.I am able to run this in my system when i deploy it in another system which doesn't hve vc++ environment its not working the exe just closes... can anyone just tell me how to deploy the exe into another system. …

Member Avatar for WolfPack
0
490
Member Avatar for sarra

hello everybody!! i am new in programming c++ so i would like ur help.. i would like to save an image into a file using c++ but i havent found any tutorial that could really help me... i would appreciate ur help

Member Avatar for SpS
0
131
Member Avatar for dj_money

Here is the one that I've tried and it works. //It will terminate the loop but it's NOT an Auto Infinite Loop like the you had. //Description: //This program asks the user to terminate an infinite loop //with a sentinel value of any kind. # include <iostream> # include <cmath> …

Member Avatar for brian63304
0
2K
Member Avatar for StealthCobra

Here is my program with the errors any help would be appreciated. error C3861: 'headTail': identifier not found, even with argument-dependent lookup error C3861: 'results': identifier not found, even with argument-dependent lookup error C2365: 'headTail' : redefinition; previous definition was a 'formerly unknown identifier' error C2365: 'results' : redefinition; previous …

Member Avatar for SpS
0
208
Member Avatar for some one

Implement a system for a bank. Design it so it can be used by the bank’s staff. It should enable the following: o Opening a new account for a customer o Closing an account o Displaying all accounts An Account o Contains the name of the customer o Contains the …

Member Avatar for some one
0
241
Member Avatar for kahaj

I'm trying to write a program to simulate a tortoise & hare program. They begin at square 1 of 70. There is a clock that ticks once per second. With each tick, the program should adjust the position of the animals according to a chart I've been given to follow. …

Member Avatar for Dave Sinkula
0
232
Member Avatar for scoobie

Hi, i am very new to c and was wondering if anybody can help me. i want to create an array of size 1 million bits. i heard you can use malloc or calloc. does anybody know how to do this, thanks in advanced, sc

Member Avatar for rnodal
0
348
Member Avatar for Cudmore

Hey! I'm learning C++ and pointers are pretty new to me, I can work with them a little but [I]still[/I] don't see the point to them.. ok, well, I do.. For example, passing variables byReference! But that's the only good I see comming from pointers (yup, I'm a n00b).. [B] …

Member Avatar for Cudmore
0
138
Member Avatar for some one

hi every1 i want to ask what wrong with my program it all work allright just the zakat function when i run the program the output is garpege here is the code [CODE] #include <iostream.h> #include <conio.h> #include <stdlib.h> class Customer { private: char name[20]; char address[30]; char city[20]; char …

0
94
Member Avatar for virusm

I need C++ source code for CPU Task Scheduling. Anyone who can help me plz send me some Source code. My project is to design a Scheduler in C++ with a queu. I'll give more information to anyone who will respond to my msg. Thnx men... :sad:

Member Avatar for Dave Sinkula
0
78
Member Avatar for jackknob

I have win2000,sp4 machine that when a user is logged on and they share the c drive as c$ it will change back to unshared after the machine is rebooted. The machine has a CD-Rom drive D shared as D$ which is not affected by it. It also doesn't seem …

Member Avatar for nanosani
0
89
Member Avatar for stupidenator

Hi everyone, I am trying to make a function such as [CODE]void resetGrid(int grid[][gridSize])[/CODE] The function needs to input the 2-D array and then set each of the values to zero. I know this should be a simple double 'for' loop but what I can't figure out is how far …

Member Avatar for stupidenator
0
91
Member Avatar for atrusmre

I'm sorry I've been posting so much, I'm still learning. :) My question how do you fill a combo using a varible. for example I want to fill my combo box in Visual C++ with something like this. [CODE] char *names[2]; names[0] = "Joe"; names[1] = "Billy"; names[2] = "Bob"; …

Member Avatar for atrusmre
0
2K
Member Avatar for brian63304

I am trying to create a list of nodes and then put numbers in them.. I can do that. But I need help trying to sort the nodes. Here is my program. Thank you, Brian [code]int null = -1; typedef struct Node { int val; Node next; Node(int v, Node …

Member Avatar for kafkanien
0
78
Member Avatar for rupz

Hi, I am new to c++ and just wanted to know how to split a sting e.g if someone were to enter their details like John age 19 dob 10/06/1986 into a basic cin, how could I split the string to store John 19 10 06 1986 into different strings …

Member Avatar for rupz
0
93
Member Avatar for boki

Since i have to go to college i got on idea to preform a simple C# Syntax highlighting for my HP ipaq 1710,dont laugh at me when i tell you that i tried to create just window form without anything else and copy it to my Pocket PC,i use windows …

Member Avatar for Pscsc
0
251
Member Avatar for Gryzor

hi! i use tcpclient to get connections from clients to my server. but i need the information of the ip address of that client. i know that i have to derive a mytcpclient from the tcpclient class, but i get some errors when extracting the socket out of it. the …

Member Avatar for kedar_challa
0
933
Member Avatar for btech

My program compiles with no errors but when I run the program it asks "Enter the number to be deleted:" if I enter any number other than the first number listed the program crashes with the following error: "An unhandled exception of type 'System.NullReferenceException' occurred in doublyLinkedList.exe Additional information: Object …

Member Avatar for Lerner
0
195
Member Avatar for Ancient Dragon

This is a simple example of how to use recursion to get a list of all the directories (folders) and file names within them. It also illustrates simple use if std::list, std::vector, std::string, std::cin and std::cout. It was compiled and tested with both VC++ 6.0 and Dev-C++ compilers on XP …

Member Avatar for Dani
0
240
Member Avatar for sam_bub

how i print the output of the c programming code in a printer and using c code? Like output is hello and also print the message Do u want to print it ? if i press yes it would be print in printer. please get me the c code of …

Member Avatar for Narue
0
31

The End.