51,593 Topics
![]() | |
Hi! I'd like to know how to print something when the user ends the program (with ctrl-c for example). An example is the "ping" command (in most linux versions), that gives the average ping when the user terminates it. Thank you! | |
hello dears! i have a question about my program i am suposed to make a program that calculates thea factors of a number and add them and see if the number is a perfect number. i made this program and it works fine but now i have to change this … | |
Hi all, [code] #include<ctime> #include<string> int main() { string snapshot_time = "10:00:00" int interval = 60; string end_time = convert_hour(snapshot_time,interval); cout << end_time << endl; } string convert_hour(string &snapshot_time, int interval) { char current_time[BUFSIZ] = { '\0' } ; struct tm tm; strptime(snapshot_time.c_str(), "%H:%M:%S", &tm); tm.tm_sec = tm.tm_sec + interval; … | |
Hi I m Fresher. I m working on Windows Mobile 5.0 And Doing Project in Microsoft visual Studio .Net 2005 using VC++/ SDK 2003. I m working on Proect " Task Manager for Windows Mobile 5.0 " Its something like Task Manager available for our PCs. we r making it … | |
Hi All... I'v a piece of code kindly help me understanding its functionality [code] #define FLAG_CDR 0*01 #define FLAG_MSR 0*01 unsigned Flags = AFE_REG_FLAG_CDR | AFE_REG_FLAG_MSR; Flags &= FLAG_MSR; // 'turn off cdr flag' [/code] how it works... | |
My current homework assignment is to code a mortgage calculator that will allow the user to input the appropriate information and return the monthly payment, the interest paid and the principal paid. An amortization schedule for the entire lenghth of the loan is also required. I have managed to get … | |
Can anybody help me on how to search a keyword in my text file. I read about eliza420 Thread but still don't get it. If i have a text file named. "animals.txt" with a content of, ------------------------------------------------------------------- Fish Pig Dog Goat Bird ------------------------------------------------------------------- and in my c++ program a question … | |
im wondering if there is a plain [COLOR="Blue"]do loop [/COLOR]instead of do while? | |
I am writing a program to batch rename files. I have a dialog box that gets the folder path from the user. I want to pass that back to the parent window. I need to know how to link the 2 windows and get the text from the dialog box. … | |
I have only been playing with visual c++ for a couple of weeks now and was just wondering what is the advantage of using pointers. To me that seems to be the hardest thing to understand so far. I am not sure how to use them and what the advantages … | |
How do I display a graphic waveform on BTHQ 128064AVC-SMN-06-LEDwhite-COG? Any sample code? | |
i have a list of words to put into an array but how do i do this the order goes from 0 to 9 so black is zero [black][brown][red][orange][yellow][green][blue][purple][grey][white] | |
This is what I have and having some problems with the checkPosn function. can anyone help me out. When I run the program and pick the posn it runs "posn already taken, please choose another. What I am doing wrong? Melissa [CODE]#include <iostream> using namespace std; class ticTac { private: … | |
Hi guys, when ive used Turbo c compiler and i wanted to put the program ona "wait key" status until the user hit sum key , ive used getch(); . when i try to use this command in Visual C++ 6.0 im getting an error.. Is there a diffrent command … | |
I have not done any c++ programming yet but was wondering how you use arrays in a for loop for example the code below int i; double D_Nath(11),D(11),er(11); for( i=0;i < 11; i++) { D_Nath(i)=PI*D(i)/er(1)*.76554; } how dod you get this to work correctly. Thanks for any help with this. | |
Hello, How to read an input(string) from the user keyboard without displaying it on the I/S, but to disply a character that I specify like (*) instead of the actual inputted character.. and if possible to store the entry on array right now, I can't find any replacement for getch() … ![]() | |
![]() | hello! I badly need to submit this program within an hour from now so any help out there who could help debug my code, i would really appreciate it. there's something wrong with my qsort() syntax but i can't figure out what . spent 5 hours trying every possible ways … |
Hi I m Fresher. I m working on Windows Mobile 5.0 And Doing Project in Microsoft visual Studio .Net 2005 using VC++/ SDK 2003. I m working on Proect " Task Manager for Windows Mobile 5.0 " Its something like Task Manager available for our PCs. we r making it … | |
Sorry to embarass myself here. Does anyone knows how to use C or C++ or Java Programming, or any other language for programming for novices? I'm a REALLY beginner. Anyone that is Professional in Programming and willing to teach please kindly teach me the BASIC of programming and the language, … | |
hello again, I've run into a problem in overloading << and >>. Within the definition when compiling its saying that 'real' and 'imaginary' are undeclared, these errors are in lines 45(real), 46(imaginary) and 57(both). Whats wrong here? And if you could please let me know how to correct this. Heres … | |
Hey every1...........i need to know dat which of the library is used in VC++ for graphics interpretrion... Can any one help me......????????????????????????????????????????????/:rolleyes: | |
hi, i have this simple code, that compiles on visual studio 2005.When i try to run the executable through visual studio {pressign ctrl+F5} it does nothing{although the test.txt has size of 1kb}, when i run the exe through the command prompt the program works fine... Does anyone know why this … | |
Hi.. I have to make a program in c++ for plotting a sine curve..using arrays ..in horizontal direction not vertical .. can I have an alogarithm or just a hint how to go on making ...thanks :) | |
This code is supposed to sort the numbers I input. I get only 0's [code=c] // Group Project 10.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <vector> using namespace std; void selectionSort (vector< int> list, int length); void fillArray(vector< int> list, int … | |
Hey, it's been quite awhile since I last posted, but I'm stuck. What I'm supposed to do is look at this code and tell what would appear on the output screen. I ran the program and found that it should display: 2 3 6 1 5 0. However, I just … | |
I need to create a program where it asks the user where is a text file. The file will open and it will be a list of names. The names should be stored in a vector after being read by the program.The program then will call a function named print … | |
i thoguht i had this working and someones done something and its now no longer working, i couldnt workout what was changed. [code=cplusplus] #include <iostream> using namespace std; int main () { Double annSal, mthSal, nAnnSal, nMthSal, pcent, numBkPyMths, bkPy; pcent = 0.065; numBkPyMths = 5; annSal = 0; nAnnSal … | |
hello to all , my name is Talal. i have no background in C++. i work in a company as marketing representative. i got a program which was made in C++ by a programmer. and i lost the sources codes file from my PC. now i have to give that … | |
I was wondering if it possbile to C++ creat a croaahair, or a dot in the center of my screen. The dot would have to run on top of all the windows I open. lol my friend wanted me to make him a crosshair for counter-strike. thx guys, if this … | |
Hey all. I've been recently trying to write down a program that lets 2 players play tic-tac-toe (aka X/O) but I wanna code it using Bloodshed C++. Thing is, I wanna do it something like this. ---- > Display the gameboard like this. 1 2 3 4 5 6 7 … | |
[B][U][COLOR=#000000]CURRENT SYSTEM[/COLOR][/U][/B] [COLOR=#000000][/COLOR] [COLOR=#000000]The name of the company that I am discussing about its system is <company name snipped> All the system running in various departments are computerized except that of the Front Office which needs to do some revamping in its system. Everyday the counter will handle the checking … | |
I am writing a short program in c on a linux platform which takes an argument from the command line. My only problem is retrieving that argument. It is an integer. Here's what is currently in my code: int seconds = *argv[0]; Thanks :cheesy: EDIT: Here is the rest of … | |
I am trying to read file input into an array so I can tally up the number of times each letter appears (including the apostrophe). I am not sure what I am doing wrong, but my file data is not getting assigned to the array outside the function. [code] #include<iostream> … | |
hi everyone im wondering how will i connect a VC++ program with an SQL server. i would like the program to have direct access with the tables/data. if you can provide a sample source code would help. thanks. | |
Hello, am a new member and this is my first posting. Having benefited from lot of posting i decided to join. But currently am trying to solve an exercise and it is proven difficult for me. I have written a program in c++ in linked list but am facing two … | |
Ok, I new to this and haven't been taught exception handling yet but I would like my program to run without crashing when someone mashes the keyboard. I have declared an int x, and I don't want my program to crash when user inputs an char or more than 10 … | |
Hi, this is not a HUGE problem but I was jw why at the end off all my codes I have to type, system("pause");. When I even do the Hello World! program thing the black screen just flashes. I was jw why no one elses codes have this. Its not … | |
hey im trying to make a simple program to calculate backpay and pay rises for my dads business, ive worked out a pseudocode for it, but am having trouble implementing it. BEGIN Salary Increase numberOfBackpayMonths = 5 PRINT “Congratulations! You had a 6.5% pay rise retroactve for five months.” PRINT … | |
i always hear about arrays and it makes sence to me but whats a tipical use for them may i pleas see an example because i dont understand why they eaven exisit | |
this is about making a loop for powers stripe3 is the variable how do u do stripe3*10 stripe3 times for example if stripe3 = 5 then my question is how do u do 5*10 5 times because there isnt an opperation in c++ for exponents so i was thinking of … | |
What do I need to do in order to get my program to print out two decimal places? [CODE] #include "stdafx.h" #include <iostream> #include <ctype.h> using namespace std; int main() { char movie[50]; int adult_ticket_price, child_ticket_price; int adult_ticket_sold, child_ticket_sold; int percentage_of_gross_amount_donated; cout <<"Enter The Movie Name: "; cin >> movie; … | |
Hi all i was wondering if any one could help me i have a program i made using wininet in c c++ and my program is not seeing if there is a connections before completing with the execution ive tried to get it sorted but cant seam to figure it … | |
const char * strstr ( const char * str1, const char * str2 ); char * strstr ( char * str1, const char * str2 ); Locate substring Returns a pointer to the first occurrence of str2 in str1, or a null pointer if there str2 is not part of … | |
hello what is a far pointer? Recommend me some good books on data structures and algos | |
Okay, thanks ahead of time for looking at this. First off the program is in C, not C++. I am trying to read in from a text file... a certain question.... but i fairly suck at programming in C. I have a file pointer set up and i have it … | |
hello guys . the code is doin well enter sorted integers and num to be searched the problem is in the last if condition [CODE] #include<iostream.h> #include<conio.h> #define siz 10 void main() { int arra[siz]={0}; int mid,beg=1,end=siz,loca=0,num; clrscr(); cout<<"Please Enter The Elements Of Array\n"; for(loca=0;loca<siz;loca++) { cin>>arra[loca]; } cout<<"Please enter … | |
Hi everyone! My name is Ricardo and i'm having a few problems with a program i'm writing. The program should deal with products information, i'm doing it using a structure, two procedures and a main function, the purpose is so that in the first function, designation of the products should … | |
Hello again to good ol' DaniWeb. Again I'm stuck. I'm a newbie when it comes to C++. I was given an assignment ([B]ATTACHED[/B]), which I'm having problems with in the first part of [B]Menu Choice A[/B] section. I'm only that far, and haven't proceeded further. I've coded the following (with … | |
Hello everyone, Does anyone know how to write a source code for 3x3 determinants. I was given that for my C++ final exam and didn't know how to do it. I could only do the 2x2 determinants and that's what i put down. Any help is greatly appreciated. thanks ![]() |
The End.