49,761 Topics
| |
Does anyone have any suggestions as to how I could better this code.(Not too fancy). I'm supposed to use a switch statement. I think the concept isn't bad. But some things are off as far as my opitions displaying correcly. [INLINECODE]#include <iostream> using namespace std; int main () { char … | |
the specific problem is that there are no errors in the prob but it is giving segmentation fault.plz check it #include<iostream.h> #include<conio.h> void main() { struct mylist{ mylist * nxt; int val; }; int a,b,c,d=1,i,j;mylist * t; clrscr(); cout<<"Enter the no&the total no of numbers"; cin>>a>>b; mylist * head=new mylist; … | |
Hello, I have this program here>> it's a random guessing number game. It works great the only thing I can't figure out, is how to display the [B]best score[/B] at the end of the Loops. The outer loop is suppose to keep track of the number of games played ( … | |
here are the program below reads five numbers, find their sum, and print the numbers in reverse order. #include <iostream> using namespace std; int main() { int item0, item1, item2, item3, item4; int sum; cout<<"Enter five integers: "; cin>>item0>>item1>>item2>>item3>>item4; cout<<endl; sum = item0 + item1 + item2 + item3 + … | |
hi......... to every one, actually i'm learning c/c++. i'm struck in the file copying topic. my problem is appending file1 to file2 , i.e we should be able to append file1 anywhere in file2 as per our wish. can anyone help me out regarding this with some coding part or … | |
Hi all! I´m having a problem, I'm reading from a txt file values (doubles) but my cout outputs the following: -9.25596e+061 -9.25596e+061 -9.25596e+061 -9.25596e+061 Press any key to continue When it should read this: 1.986772 2.607455 0.000000 0.000000 The code is: [CODE] #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <time.h> … | |
:confused: hi everyone as much involvement i get with C++ i alway get to a point where my fingers are tied, and here i am. This piece of code displays a date then the time selected by the user, wherei got stuck are: 1. i tried to validate (check) the … | |
Hi Iam using Borland C++Builder6 ..This is the first time I use BDE I ve read some tutorials and articles and Ive tried to create an alias for my *.mdb Microsoft Access 2003 database so that I can access it from within the application but it does not work. What … | |
Hello, I have this for loop here, and everything is great except I can't figure out how to display 3 numbers per line instead of all number on one line. Can anyone help? Thanx! #include <iostream> using namespace std; [INLINECODE]int main( ) { int x; cout << "Numbers between 5 … | |
Why cant we overload assignment operator using a friend function? Please help?? Thanks, comwizz. | |
Hi, I'm using Microsoft Visual C++ and I keep getting this error referring to this one line in my main file. The line of error is in bold. Header file [php] int f (int n); double e (double accuracy); double exp (double expo, double exaccuracy); [/php] Computation file [php] #include … | |
Hi, I'm new to this C++ stuff. So if anyone can help that would be nice. I have this program to generate a random number and a the user inputs a number from the keyboard to correctly guess the number that the computer randomly chooses. but the numbers are always … | |
is this program accurate? if not i need somebody dat can make clear directions to me on how to create this program with no errors or warnings. i got 2 errors n 1 warning on here so far after i compiled it. the code is in the following: //Program 2-2 … | |
Hello, i have a couple questions. im making a simple program were the user has to guess a number. One of my problems is that ounce they enter a number, they have to restart the program to guess again because it will quit if they guess it after the first … | |
:sad: I have to write a program using classes, and design an online address book to keep track of the name, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. The out put menue should look like this: 1: To see if a … | |
hi, I have a problem. I am trying to make it so when i open up my program A jpg loads with it. I have a add-on called JPGloadthat i downloaded from the "update tool" in Dev c++ .when i compile the code that was included with it, gets a … | |
Hi can anyone please tell me how to create a shortcut for the bcc32 compiler? I want to access it from my desk top Many thanx :mrgreen: | |
He friends, I would like to have some guidance over projects to take up in C++? I would like to take up a challenging project . Also I have changed my compiler from turbo C++ to Dev C++ but i cannot figure out how the output can be seen ie … | |
Hi. I wanted to save an array elements to a text file using Microsoft Visual C++. But I cant seem to put the data into the saved file. I have this part of the code to initiate the save as dialog..Pls help.Thanks void DATADlg::OnSave() { CFile f; char Filter[]= {"DATA … | |
I am learning C++ using Stephen Pratas "C++ Primer Plus" (excellent book btw). However i am stuck on exercise 6 chapter 4, where in essence i just have to use new to allocate the array of structures dynamically. I can allocate a single structure dynamically, however i still do not … | |
Write a program that, given a file of text (called poems.dat), will read in several lines of text, until end of file is reached and display a table indicating the number of occurrences of each letter in the alphabet in the text. For example, the phrase “This is great fun! | |
Hello! I'm new to the site and I'm having trouble compiling my program. I was hoping that somebody can take a look at my code and try to point me in the right direction. It's a charge account program that consist of using a repetition control structure. Here are the … | |
:lol: hello i want to show the time in a certain program in part of seconds but i don't know,can you help me in solve this problem? thanks | |
I'm using windows sockets 2, and I've been able to write a server using a client array of sockets to hold more than 1 client at a time. All of this is fine and dandy, I can have multiple clients from the local machine connect to 127.0.0.1 without a problem. … | |
This code below suppose to repeatedly prompt the user for an hour number and if the hour is “free | |
Hello how is everyone doing! I just want to make sure that this code was working properly. I tried compling this code on Visual Basic C++ 6.0 and it worked out fine without any errors or warnings. I am not looking for a quick answer. I just want to receive … | |
:confused: Hello i am a newbie in programming in c++ and in linux. I hav knoppix in cdrom and i want to start programming in c++ with the help of knoppix. But I does not know anything about how to start. I don't know create a new c++ file in … | |
Hi all! I'm working in a project in visual c++ 6.0 with the console application and I want to ask you how to create a program that has portability to work in both platforms, windows and linux. Another thing, which function we use to round a double to the nearest … | |
hii,i'm a beginner :o ,don't :lol: ,just show me the way btw,i learn abt c and c++ can u show me the big differences between 'em?? thank's | |
Hi, I'm trying to write a program for homework in my 2nd semester computer science class. What I need to do is update a master file with information based on a transaction file ( both are already created). i.e. from the transaction file I read in Lena 10 and I … |
The End.