2,827 Posted Topics
Re: [QUOTE=mimo77;668411][COLOR="red"]can anyone help me plz ,,plz with my project which is[/COLOR] Project Title: Simple Flight Seating Arrangement Program. Description: The seating arrangement of a flight is stored in a data file flight.txt containing five lines. Each line contains four integers, a value of 1 represents a reserved seat, and a … | |
Re: > Ok I am new to C++ and I am having a hard time trying to figure out how to Sort the array I have created. I dont know if I am on the wrong track or if I am on the right track. Someone PLEASE help!! I have to … | |
Re: Regarding your first problem, you'll likely find the cctype library helpful: [url]http://www.cplusplus.com/reference/clibrary/cctype/[/url] You're going to have to elaborate about what you mean by "case". Are you supposed to implement a "switch" statement with some "case" statements inside of it, or are you talking about something else? I think this problem … | |
Re: [QUOTE=RayvenHawk;671343]I have an assignment that asks to create a program to input students names & test scores. After which the user gets the option to calculate the average and print out which students were below, and/or print out the highest score and which students had that score. Since the total … | |
Re: Try this program: [code=cplusplus] // HelloWorld.cpp #include <string> using namespace std; int main () { cout << "Hello World" << endl; return 0; } [/code] See if you get any errors. You shouldn't. | |
Re: [QUOTE=CoolGamer48;671883]Wow, nvm - just figured it out. Have alpha be first, not last. But if someone could confirm that and/or check the above code I'd appreciate it.[/QUOTE] I don't think you want to be dividing by 0xff, 0xffff, and 0xffffff, but rather by 0x100, 0x10000, and 0x1000000. In particular, 0xff00 … | |
Re: > start quote: import java.io.*; import javax.swing.*; public class name{ public static void main(String args[]) throws IOException { BufferedReader in = new BufferedReader (new InputStreamReader (System.in)); String[] input = new String[100]; int i=0,ctr=1; String name; do{ name=JOptionPane.showInputDialog("Enter Name:"); input[i] = name; i++; }while(input[i]!=name); for (int j = 0; j < … | |
Re: [QUOTE=mahlerfive;671900]Your code is fine, can you paste the compiler error?[/QUOTE] This thread has been dead for years. I'm sure the OP has either solved it or not longer cares. | |
Re: [QUOTE=loimarie;670930]Thanks for the reply...It's actually very hard for me because I am not an expert of c.I only know the basics...Can you please give me any idea on parsing?[/QUOTE] Well if you have the following equation: f(x)=[COLOR="Red"]3[/COLOR]x^2[COLOR="Red"]-5[/COLOR]x you need to extract the 3 and the -5. You need to know … | |
Re: [QUOTE=hny_lyn;671055]i got you idea sir!!! but i still dont have any idea for doing those mathematical operations!!![/QUOTE] This is not a helpful post. It's a two sentence response to a multiple paragraph response trying to give you some help. Nowhere does it explain what precisely you are stuck on, except … | |
Re: [QUOTE=Ancient Dragon;671169]Nope -- would have to be Wal-Mart since its the world's largest retailer. Starbuk's coffee houses are going under because people don't want that expensive stuff.[/QUOTE] I doubt Starbucks is is going anywhere. I live in a city of slightly under 200,000 people and I just did a Yahoo … | |
Re: [QUOTE=krebstar;670339]Is a CLI/Windows forms project the same as a Windows Form Application? (I think this is a managed code project using .NET, whatever that means..) It seems you are right, I tried creating a WinForms app, and am only getting the Win32 solution.. However if you try to open the … | |
Re: [QUOTE=sciwizeh;670733]yes the i mean the built in mingw compiler perhaps i should have written Dev-C++'s compiler, but i thought my meaning would be clear[/QUOTE] Yes, download and install NetBeans, then download and install mingw, then download and install the Netbeans C/C++ Development Pack (or you can pick a NetBeans that … | |
Re: [QUOTE=kungfoo;670668]i'm struggling to do the calc function. I can do it all seperatly, but i need to do it with a calc function[/QUOTE] Figure out the exact formula you need to have, what the exact inputs are, and what you want as output. You need to figure out the physics … | |
Re: [QUOTE=gregorynoob;669851]the problem is to find the minimum numbers to be popped from an array to make it sorted. so for example 12534756, you can pop all but one, but it's best to pop 5 and 7 cause it's the least needed to make it sorted. I'm having difficulties finding a … | |
Re: [QUOTE=Narf!!!;670379]Are you completely sure about this? As far as i know if you have declared the Point class' constructor Point() and then you state Point B(); then B is an instance of Point instantiated via the default constructor. I also thought that that if you declare the copy constructor the … | |
Re: [QUOTE=genesis_react;669843]Can anybody help me with this.. we are to make a diamond pattern of asterisk..I had the codes below..My problem is.. we are only allowed to use one asterisk and one space to make the program and inside the diamond pattern we are to put the letters A,B, and C.. … | |
Re: [QUOTE=Linz-30;669743]Hi everyone, I am a complete novice and need to write a pseudo-code for a query (photo.xql): xquery version "1.0"; (: Generate a photo page :) declare namespace request="http://exist-db.org/xquery/request"; declare namespace transform = "http://exist-db.org/xquery/transform"; import module namespace history = "http:// localhost/history" at "history.xqm"; let $id := request : request-parameter ('id', … | |
Re: [QUOTE=nixon623;668530]guys i have no idea how to use this functions,im noob can u write me a single line of code,it wil l help me a lot! i dont think its hard to solve this[/QUOTE] The goal is to create a string and end up with the full filename, with the … | |
Re: Anytime you implement any type of Listener in Java, you need to implement at least one function. With ActionListener, it's "actionPerformed". With ItemListener, it's "itemStateChanged". Always type in "ItemListener", or whatever Listener you are using, into google, find a link that takes you to a Java documentation page, then scroll … | |
Re: [QUOTE=lich;666954]can anyone tell me how to round off the values..[/QUOTE] Check the Math class for problems like this: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Math.html[/url] | |
Re: [quote] 3 0 -6 0 [/quote] What do the zeroes represent? Data? A line termination flag? Will they always be zero or always the same or could they be like this? [quote] 3 2 -6 1 [/quote] Your output shows this: [quote] 3 -6 0 [/quote] so you are throwing … | |
Re: [QUOTE=matt_hates_code;666799]Ok I'm using the GCC compiler in C . I have a tree style of menu that has been designated function "Manager". I want to return to the top of the tree so basically what I do is at some point from within the "Manager" function I make the call … | |
Re: You have a 6 x 6 array of grades. You have the code that computes the average for one person. You need to compute the average for all six, so stick that code into a loop that executes 6 times (once per person). Have a variable called [ICODE]highestAverage[/ICODE]. Initialize it … | |
Re: > It compliles and runs but does not do anything when i click on the button import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import java.text.DecimalFormat; import java.io.*; import javax.swing.JOptionPane; import java.lang.*; import java.math.*; public class last_try implements ActionListener { public static void main(String[] args) { JFrame f = new … | |
Re: [QUOTE=gang;645922]can anyone there help me about my problem in displaying a record of names,gender,annual salary and age..the inputs are the first name,lastname,gender,birthday and monthly income...i just have a hard time implementing it coz i have to use a string to deal with the name..how will i make it???just a hint....[/QUOTE] … | |
Re: [code=cplusplus] for (int x=0; x<8; x++) { cout << " " << endl; int answer; cout << "Enter item number: "; cin >> answer; cout << "Select another item Y/y (Yes), N/n (No): "; char selectionTwo; cin >> selectionTwo; if (selectionTwo == 'N' || selectionTwo == 'n') { } placeorder[x].menuItem … | |
Re: [QUOTE=ArkM;662141]It's C++ programming forum. Where is C++ in your post?..[/QUOTE] There's no "Algorithm" or "Game Theory" section in Daniweb (as far as I know), so if gregorynoob is doing this in C++ and needs algorithm/strategy help, it seems like the right forum. [QUOTE=gregorynoob;662137]given x and y (the field dimensions) and … | |
Re: [QUOTE=comondx;665132]in code lots of things missing. i want to help the correct code. i complier borland.[/QUOTE] You're missing the point. You need to describe what you've done, what problems you're getting, what the exact errors are along with the exact line those errors are on, what you're stuck on, what … | |
Re: [QUOTE=waldchr;665144]Hi I have a program i was writing to solidify my knowledge of files and how to handle them. I seem to have hit a snag though. What the program does is create files based on a user inputted date and allows them to add content to the files (kind … | |
Re: [QUOTE=anshulagarwal;664926]I am facing one problem in visual c++.. when i did the same thing with 500 data on borland, i am getting right result which means my coding is absolutely correct. [/quote] No, that DOES NOT mean your coding is absolutely correct! I know nothing about Borland except I keep … | |
Re: [code=cplusplus] #include <iostream> #include <string> #include <iomanip> void showMenu(); using namespace std; const int menu = 1; struct menuItemType { string menuItem; double menuPrice; }; void getData(menuItemType placeorder[8]); void printCheck(menuItemType printorder[]); int main() { cout <<"Welcome to Johnny's Restaurant"<< endl; cout <<"----Today's Menu----"<< endl; showMenu(); cout << endl; cout << … | |
Re: Well, you can make everything an unsigned char and store a big array of them. Typecast as needed, but an unsigned char is one byte. Check out this thread. It may be of use. I don't see that a template is necessary, but make sure to realize, as I did … | |
Re: ArkM is correct. It needs to be [ICODE]int HowEasy::pointVal(string s)[/ICODE] . If you get other errors with that, the solution is to fix those errors, not go back to [ICODE]int pointVal(string s)[/ICODE] . Try taking the ".h" off of your [ICODE]#include statements[/ICODE]. Add [ICODE]return 0;[/ICODE] to the end of the … | |
Re: [QUOTE=besktrap;664139]Heres the main part: #include <iostream> #include <windows.h> #include <fstream> using namespace std; char txtname; int main(void) { blah blah blah blah.... if (menu == 3) { cout << txtname; cout << "\nPlease enter the name of the file, followed by a '.txt'. "; cin >> txtname; } }[/QUOTE] You … | |
Re: [QUOTE=Sana nawaz;664201]i have made most of that project .. i just want to confrm all that if u want to help me then thanks otherwise just do ur work. thank u[/QUOTE] You say you've made most of the project, yet you do not show what you have done or even … | |
Re: [QUOTE=Abakiz;663322]My problem is that when i enter a second name into t it just ignores it or crashs the system, am running borland 5.5. When i enter Oli its fine but when i enter Oli Dl it crashs. #include<iostream.h> #include<iomanip.h> void main() { char t[100] = {0}; char key = … | |
Re: [QUOTE=lich;662874]hi we have to create a soda vending machine. so they asking a interface. i have designed the interface using netbeans. but i dont know hwo to code in there. if anyone can help me regarding this. and in this interface it has radio buttons and combo boxes so please … | |
Re: [QUOTE=Salem;662115][url]http://news.bbc.co.uk/1/hi/technology/7539329.stm[/url] "For the purposes of the study, two people were considered to be acquaintances if they had sent one another an instant message." I wonder if a distinction is made between two friends who communicate frequently, and the case of "Hello, I'm an IM spammer" and a response of "Go … | |
Re: [QUOTE=Ancient Dragon;659813]Please vote for your favorite avatar -- Too bad polls can't include graphics. I would have like to add more names, but max of 10 allowed, so if your favorite is not listed here just check Other and post the name you want. And you can vote for more … | |
Re: [QUOTE=jwenting;631990]no, but both Osama and McCain are Marxists...[/QUOTE] Are you trying to make a point when you post stuff like this? Do you really believe it's true? Are quotes like the above and "Osama bin Barak bin Laden ibn Hosseini" intended to add to the discussion or just to get … | |
Re: I'm not sure why you have a nested loop in this program. I don't think you need one. I think I would create a function that returns true or false (1 or 0) based on whether a number is prime. Call this function for n and n + 2. If … | |
Re: [QUOTE=dongzhe;657595]for my new job, i have to learn coding for the chips. i know c, but i don't have any idea about how to coding for chip. anyone can give me some hit where is good place to get start.[/QUOTE] What kind of chip? Are you talking about microcontrollers? I … | |
Re: [QUOTE=Samuelandjw;662055]really sorry about ignoring the rules. Can I edit my post? I cannot find any link to edit my post ...[/QUOTE] You can edit your post for about half an hour after you post it, then you can't after that. You should just add a new post now instead. | |
O.K. I wrote my own version of the Addiction Solitaire game using a JFrame and it worked. I want to put it on the web, so I'm converting it to a JApplet. I have 52 PNG files, one for each card, that I need to be able to access for … | |
Re: [QUOTE=PaulNickel;660384]Hello everybody, I have been working on this code segment for about three days and cannot figure out what is causing this error. I am trying to get a specific value out of an arraylist of sorted objects. Here is the code: [code=java] public RateEstimator getMinRate() { // return null … | |
Re: [QUOTE=clutchkiller;660615]I am just currently getting into programming, and was curious. I know you wouldnt call C an outdated language, but for someone like me, would it be best to learn c++ instead of starting on C? If im correct, C++ is object oriented and C is Structured correct? So if … | |
Re: Try replacing [code] inFile.open ("c:\Ch9_Ex9Data"); [/code] with [code] inFile.open ("c:\\Ch9_Ex9Data"); [/code] It's interpreting the '' as an escape character rather than a backslash, so you need two of them. | |
Re: [QUOTE=CoolGamer48;659556]I'm writing a program for a contest (it's a demo, not the actual thing - so I'm not cheating by asking for help - and my question isn't directly related to the algorithm they want anyway). To submit a program, you send them the .cpp file, and they execute it … | |
Re: [QUOTE=Jennifer84;659710]I have a general question. I am trying to read a file named: 1.0.0.txt but this seems not to be possible. The MessageBox shows emty. If I trying to read a file ex named: File1.txt it works. So I wonder why it is not possible to read this file named … |
The End.