199,112 Archived Topics
Remove Filter ![]() | |
Hello, Stuck on one line of code, tried everything but could not make any progress. Please help. Thanks in advance. The problem is on line 39 which is: slant_height = SphericalCone1.getSlantHeight( radius, cone_height) ; TheNetBeans IDE6.8 displays the error message: Can not find symbol: class SphericalCone But SpericalCone class compiles … | |
[code] #include <iostream> using namespace std; int main() { double var1 = 0; var1 = 2/10; cin.ignore(); cin.get(); return 0; } [/code] Its not setting var1 to .2 it is keeping it at 0. wth? it does 10/2 = 5, but then it does 2/10 = 0. | |
hi there, i have a webpage which is divided into three frames, left frame, main frame and the bottom frame. all the buttons are in the left frame, hence, once a button is clicked, the data will be displayed in the bottom frame, now my problem is that, how could … | |
Hi guys I am trying to read 8 lines from a file an and pass each line of data to a separate SPE using dma transfers.. how can I do this any ideas? | |
[code] #include"stdio.h" #include"conio.h" #include"process.h" #include"ctype.h" #include"string.h" #include"io.h" #include"fcntl.h" #define length 1 struct StudentInfo { char studentid[8]; char lastname[15]; char firstname[15]; char middlename[15]; char gender[6]; char birthdate[15]; char age[3]; char contactno[15]; char guardian[30]; char address[120]; }; struct tmp { char studentid[8]; char lastname[15]; char firstname[15]; char middlename[15]; char gender[6]; char birthdate[15]; … | |
would the workings of strlen() be something like this? [code=c++] int strlen(const char * str) { int size = 0; while (!!*str) size++; return size; } [/code] any feedback would be appreciated. also i have learned that !! will convert a value to an actual bool eg. !!104 = 1 | |
i know the following function is not correct, but its suppose to read a text file(which containts the words "hello all") and pass it to a Vector called V1 and then encrypt it and pass the encryption to a second vector called V2 and finally output the result into a … | |
hey does anyone know if i am using the srand() fucntion correctly to randomly choose if a persons letter is X or O? [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { srand(time(0)); int playerTurn = rand() % 2; char initPname; if (playerTurn == 1) { initPname= 'X'; playerTurn++; … | |
Hi, so in essence I have two little scripts: a server side script and a client side script. My client script sends a request to the server, and the server sends a string to the client. Once I get the string back into the client, I set it to the … | |
![]() | Hi guys, as per title above, im at my wits end after a week of thoughts.... i want to download a file from a SSL web to my local(C:\) e.g [url]https://www.abc.com/File/myfile.txt[/url] Scenario: from the web browser(Internet Explorer), i required to login to the site in order to download the file. … ![]() |
//I am trying to use the reverse function but only get garbage when trying to print s2. How do I properly assign s2 a value in order to print it in main? #include <iostream> #include <string> using namespace std; class ch_stack { public: void reset() { top = EMPTY; } … | |
I have a homework assignment that's due in a couple of days and I need a set of experienced Java eyes to confirm that a few of the answers to the questions below are correct. The hard part about these questions (for me anyways as a newbie Java person) is … | |
I'm new to Java and can't seem to understand why this code doesn't work. Any input would be appreciated. Thx. [code]Public class MyClass int a; float b = 1.5; public void static main(String args) { MyClass mc = MyClass(); mc.a = 1.5; system.out.println(b); }[/code] | |
If I where to have a matrix of say: 123 456 789 How would I write a getVal() functions so that row[0]col[0]=1 and so for? | |
[CODE]current = queues[i];[/CODE] This line of code is killing me. I am suppose to be doing a write method for an array based priority queue. However I cant seem to get the first node on the give part of the array. queues is of the Queue class which is a … | |
I want to append string in front. [CODE] 'For example Dim value As String = "a" 'I want to append the 'value' string so that it prints the below: ' gfedcba [/CODE] I found the below thread which tells the solution for my problem: [url]http://www.daniweb.com/forums/thread139781.html[/url] But I was wondering if … | |
Hello everyone, Background: I am currently attempting a project for a professor of mine, but I cannot integrate my formula properly into my code. The project calls for a conversion from numbers to words. (I last worked in C++ a year and a half ago, so any words that don't … | |
Trying to learn recursion. Problem asks to use recursion on non-negative number to insert commas. Ex: 20131 as 20,131. My program adds in an extra comma at end. Any help in pushing me in the correct direction to fix this would be appreciated. Tried to use a 'count' to determine … | |
My problem is I want to be able to read through this xml document and populate a winform before validating it and then storing it into a table. This is a snippet of the xml document, it's way too big to put it all here. [code=xml] - <Applicant> + <common:PersonName> … | |
HOMEWORK HELP - Just so i stick by the rules. The second part of my assignment is to create an array object, and love and behold, im having problems passing my small array into the function. Bellow is my code of what i have done so far, the solution seems … | |
Hi developers, I'm not sure if this is possible, but I've tried to add database elements to a list box. There are no errors shown, but it simply does not work. Here is the code below: [CODE] if(criteria1 == 1){ getDBConnection(); try { stmt = conn.createStatement(); if(stmt.execute("SELECT Clients.Firstname FROM Clients … | |
Ok i am writing a program with Arrays and could use a little help. I have to build a two dimensional array with data from a file. The file has date that first is two numbers followed by a list of charterers. So the fist line of data is 2 … | |
Ok I have the following XML file: [CODE]<?xml version='1.0'?> <root> <GAME_INFO> <TIME>xcxvxc</TIME> <CLOCKON>False</CLOCKON> <PHASE>1</PHASE> <GAMEID>43534534534535</GAMEID> <COMP>SUPER</COMP> </GAME_INFO> <TEAM type="H" name="Bulls"> <SCORE>34</SCORE> <ABBR>BUL</ABBR> <BGCOLOUR>#003366</BGCOLOUR> <TXCOLOUR>#CCCCCC</TXCOLOUR> </TEAM> <TEAM type="A" name="Chiefs"> <SCORE>10</SCORE> <ABBR>CHF</ABBR> <BGCOLOUR>#CCCCCC</BGCOLOUR> <TXCOLOUR>#CC9933</TXCOLOUR> </TEAM> <KICKERS team="H"> <KICKER_NAME>10. STEYN</KICKER_NAME> <KICKER_STAT>PEN-1/1 CON-3/3 DG-1/1</KICKER_STAT> </KICKERS> <SCORERS team="H"> <NAME0>9. du PREEZ</NAME0> <SCORE0>2</SCORE0> <NAME1>11. HABANA</NAME1> <SCORE1>1</SCORE1> … | |
Can someone help me with this code.. I have a function which is InsertNode() it is use for inserting a new node after the index in the double link list.. For example I want to add a node of value 6.0 after position 3 This is the code i write..but … | |
[CODE]#include <iostream.h> float salary (int, float); int main() { int n,h,i; float r,GS; cout <<"Enter number of employees: "; cin >> n; for (i=0;i<n;i++) { cout << "\n Hours= \t"; cin >>h; cout<< "\n Rate= \t"; cin >> r; GS=salary(h,r); cout << "\nSalary=\t"<<GS << "\n"; cout << "Rate=\t"<<r<<"\n\n"; } return … | |
this my cpp file : [CODE]//****************************************************** // Chapter 15, Programming Challenge 7 * // PersonData and CustomerData classes * //****************************************************** #include <iostream> #include "PersonData.h" #include "CustomerData.h" using namespace std; // Function prototypes void displayPerson(PersonData); void displayCustomer(CustomerData); int main() { // Create a PersonData object and pass arguments // to the … | |
I wrote this java program that performs functions of a vending mention. But now I need to write it using methods, how can I do this? Here is my code: (Any help would be greatly appreciated! [CODE]import java.util.Scanner; import java.util.Random; public class VendingMachine { public static void main(String[] args) { … | |
Hello all I wanted to make a text editor in C or C++. I wanted to make it for learning purpose only and also so that I can modify it further according to my personal use. I am good at C++ but do not have much experience at writing large … | |
Hello People, I've joined this forum and I need some help with sorting a vector of structures. Here is the problem: I have the following structure> struct student { char name[20]; char lastname[20]; int points; } class[10]; Can you help me figuring out a void function that will have a … | |
[CODE]#include <stdlib.h> #include <stdio.h> #include <conio.h> int main() { int tempnum = 0; int i; int mainnum ; int maincount = 0; int tempcount ; int *a; int n; FILE * file; file = fopen ("input.txt", "r"); if(file==NULL) { printf("Error: can't open file.\n"); return 1; } else { printf("File opened … | |
i'm trying to write an algorithm for this problem given n<2m numbers of m bits each design an O(n) time algorithm that finds an m-bit number that is different from all of the n given numbers. comparison is done in O(1) time. my question is this. if i use a … | |
Reading from a text file on your local computer is easy, but surely using a URL to point to a different location should work too? The code I have thus far is as follows [CODE] 1. using System; 2. using System.IO; 3. 4. namespace csharp_station.howto 5. { 6. class TextFileReader … | |
I want as said in 'cout' to input 10 or more letters in this statement but when i try to run it when I enter more then 10 letters i get error that says:: Run-Time Check Failure #2 - Stack around the variable 's' was corrupted" so is there any … | |
Hi, I am trying to hide tables when a page initially loads and only display them when a button is pressed. When the page loads the tables show and I need then to be hidden. What am I doing wrong? I am new to this. Here is the code that … | |
Hi all. I'm having an issue that I CAN NOT figure out for the life of me. The program is to get user input about there paycheck , then calculate the answer. What my problem is I can not get the php part to print anything inside the <?php?> tags. … | |
I have a weird Buffer Clearing Error in this code. This is the line that is causing the error. [CODE] if(a<=0) [/CODE] After you compile the code and run the code put in a group of letters like abc when the programs asks you to put in an integer. The … | |
Hi there DaniWeb community, I have a problem with such a task: I need to create a programm that will open, give option to modify, and save modifications to other text file (with other name). All I did so far is programm that can open a .txt file and read … | |
Hi I am new at python, so say I have a text folder with many number records in a single column how would I go about extracting only numbers that begin with zero and is either 10 or 7 digits long creating a new txt file for the 7 digit … | |
say int a[]; int &p=a; int *q=a; what is the difference b/w p and q ?? Is it like q can retrieve the value of the address which it is pointing to where p cant do that ... or is there something else also..... | |
This is my code, which displays either an image, or message depending on the time: [CODE]<?php $b = time(); $hour = date("g",$b); $m = date ("A", $b); if ($m == "AM") { if ($hour == 12) { echo "Good Evening!"; } elseif ($hour < 4) { echo "Good Evening!"; } … | |
Hay I'm just spent hours on google and other sites, can't find any help. I just wrote my 1st major application and now I want to make it installable. Is there components I can download or built in that I can use to do this? | |
Does anyone know where there is any good documentation for input functions in C programming? I've been searching google for quite awhile with no luck :(. | |
Ok..I have a database with clients and their information. They can login using their own assigned username and password. I am looking for a way I can access/edit their info from my admin side without having to enter individual user info to access them. On another note I am looking … | |
hi every one........... i'm new in this forum and need ur help please.... i want to write a programme using c++ code, programme that find the optimal parenthesization of a matrix-chain product, then perform the optimal matrix -chain multiply 4 a sequence of matrices, but the user should enter the … | |
Dear all. how can I put my output array into file exactly as it appear below: [CODE]Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) [/CODE] | |
I seem to have trouble reading the input from the array [CODE]#include <stdio.h> #include <conio.h> #define ROW 1 #define COL 6 void printinfo(int[][COL],int,int); void findId(int[][COL],int,int); int sum=0; float avg=0; int main() { int info[ROW][COL]={0}; for(int x=0;x<ROW;x++) { printf("\nEnter the students ID number:"); fflush(stdin); scanf("%d",&info[x][0]); for (int y=0;y<COL;y++) { printf("\nEnter the … | |
Hi all! I'm writting a little application and I'm triying to give it a feature where the user can move the Mouse over an component(JButton) and gets a little explanation what the Button does if pressed. I have an Rectangle for every component I use to set the bounds of … | |
hello friends I have a large table which contains the large text data. the table cell shows the value as for example if value is "Hello Friends" it shown in cell as "Hello Fr". which cuts the value so want to display this complete value in rectangle like joptionpane (I … | |
I`m trying to use sets and gets for a code, but it`s not compiling I`m not sure how to set and get a String, this is what I have so far this is class Car [CODE] String color; void setColor(String col) { color = col; } String getColor() { return … |
The End.