199,113 Archived Topics
Remove Filter ![]() | |
I need to write a function that adds entered values to a sequence AFTER the current_index [CODE]void sequence::attach(const value_type& entry) { assert(size( ) < CAPACITY); size_type j; if (!is_item()) current_index=0; for (j=used; j>current_index; --j) data[j] = data[j-1]; data[current_index] = entry; ++used; }[/CODE] current_index is the position in the dara array … | |
I need to create a christmast tree which takes R value from user then output on console a Christmas tree in which last part height equals R. The tree consists of triangles of heights from 1 to n.The shape must look like (for R=4) [IMG]http://img136.imageshack.us/img136/4862/christ.jpg[/IMG] thanks in advance... | |
Here is the simplest program: [CODE]#include <iostream> using namespace std; int main() { cout << "hello" << endl; cin.get(); return 0; }[/CODE] When I ran it (using Dev C++), there is no output, just a blank screen. The problem seems to be from the "endl". If I delete it, or … | |
hi i have radio button in jsp i want check that radio is selected or not!! [CODE] <input type="radio" name="code1" value="1" > [/CODE] how can i check in input that radio is selected or not!! for example put if in input [CODE] <input type="radio" name="code1" value="1" <% if(?)%>>[/CODE] | |
the question is using pointer variable: a)write a program that receives a sorted array of integer.then it will read an integer value and insert that integer value in correct place (using pointer variable) -is it how im write the code right. b)improve the first program code by allowing the program … | |
I need to use a DropDownList in my application made in VB.Net where I can select multiple values from the List. Please help me out.. thanks | |
I am writing a simple program to take a user-supplied file, read the contents, and output email addresses found in the file. If the user supplied an invalid path/file name, I want to prompt the user to try again. Right now, everything works properly if the first file name the … | |
Hi all I have a datetimepicker icon in my toolbox but when i try to add to the from in datagrid view it comes up with an error saying "Element not found" and when i click on the help icon in this pop up box it displays nothing. Forgive me … | |
Okay friends this is actually my school work. My teacher asked me to make a diamond asteriks. I just try and with my code [CODE] #include<iostream> using namespace std; int main() { char b='*'; for(int i=10;i>0;i--) { for(int j=0;j<i;j++) { cout<<" "; } for(int c=10;c>i;c--) { cout<<b; } for(int a=10;a>i;a--) … | |
I'm scanning a file to see if user input matches a word in the txt file.. if it matches.. increase the array size and add the word. This is a 2d array. "max_word_size" is currently just a constant variable. [CODE]void UserMode(char userAnswers[][max_word_size], int *size) { FILE *fid = fopen("dict.txt","r"); char … | |
I am testing with HttpGet to simply see if it would download anything from my website, but the application crashes on startup. Anyone know why? [code=Java]package com.httptest; import java.net.URI; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import org.apache.http.client.methods.HttpRequestBase; public class httptest extends Activity { /** Called when … | |
I have a datagridview thats bounded to a db and bindingNavigator that has Add/Delete/Save buttons. When I select a row and delete it, the row gets deleted from the datagridview, but when I restart the application, it doesn't get physically deleted from the database. Search suggests putting this code inside … | |
Ok. So in the following section from my XML document, I have two attributes in the Unit tag. The first, [I]type[/I], and the second [I]uname[/I]. I wish to click, say a button that says "Troop" on it, and the program will search through the XML file and find the entries … | |
How to set caption icon in java? Like firefox icon on the top caption bar. and how to run a process in background in java? Thank you. | |
Hi guys, I have a problem using GridBagLayout. I will paste my code here. You can run it. Sorry for the length :) I tried to comment it as much as possible. So there are three panels in this GUI. One left, one right, one south. The problem is only … | |
Yes it's about loops. I have the below script and the first loop there is no problem as it mixes the variables but on the second loop I can't seem to figure out how to find the value of $c. Does anybody know because this is an annoying puzzle I … | |
I need help designing a method that finds the percentile of a value given the percentile rank. Here are the exact instructions: public double getPercentile(int p) This returns the value of the pth percentile. A value stored in the array is the pth percentile if it is greater than or … | |
Hi Everyone. I am working on an assignment with the following instructions... Enhance the DataSet class so that it can either be used with a Measurer object or for processing Measurable objects. Hint: Supply a default constructor that implements a Measurer that processes Measurable objects. I'm confused about how to … | |
Hi all, I've spent the last week trying to sort this out, and the more I delve into it, the more confused I'm getting. I've done some background research (searched on google and here for sort function issues) and really I can't make head or tail of what's going on. … | |
Hey guys, Im making an uno card game and I think so far so good, however once I compile it, my program doesnt read any errors, but a box pops up stating "vector subscript out of range" and it is confusing me a lot. I think I can identify where … | |
Hi all, Below is a program that continues to give me multiple errors when I ran it. I kept getting error which I don't know how to fix and where/or what I did wrong. I need your help. Please bear with me as you read through this because it is … | |
why does this program have an exception in VC++ 2008 Express? [CODE] #include <conio.h> //#include <C:\WString(v2.00).h> #include <iostream> #include <string> using namespace std; class WCS { public: wchar_t* string; WCS(const wstring& wstr) { wchar_t* c = new wchar_t [wstr.size() + 1]; wcscpy(c,wstr.c_str()); string = c; } ~WCS() { delete [] … | |
Hi guys, I have been searching the web a bit without success, perhaps I'm using the wrong keywords. Anywho, I'm looking for a way to monitor how many bytes are uploaded/downloaded from the computer, weather trough the winAPI or whatever, I would really appreciate any help on this :) | |
i have problem in updating GUI from another thread my code gives me exception i debugged to find the reason of exception i found that it is here [ this part of Wedget class [code] if (display.thread != Thread.currentThread ()) { if (display.threadId != OS.GetCurrentThreadId ()) { error (SWT.ERROR_THREAD_INVALID_ACCESS);//hereeeee } … | |
Hi i wrote classes of content and label providers as illustrated here [url]http://www.vogella.de/articles/EclipseJFaceTable/ar01s05.html[/url] now i want to Bind my tableview with such list as it is done here with textfield and such strings [url]http://www.vogella.de/articles/EclipseDataBinding/article.html#swtdatabinding_dependency[/url] :-/ can i do that? | |
I'm trying to a open a connection to a local database and no matter what I try it just won't work (I'm pretty new to SQL Server and VB for that matter) I tried using 'sqlconnection' with different connection strings but none of them worked or gave me any useful … | |
My program keeps crashing and I can't see why...pretty sure its something to do with creating matrix B since when I remove the commands to create matrix B it runs ok. Can anyone see what is wrong? Thanks in advance! I have the header file: [code=php] // matrixlib.h - A … | |
Hello, I just started learning Java, and I'm having problems getting Kruskal's algorithm to work properly. While I have had more success implimenting this in C++, I'm still having issues there. I have a feeling my find() method may be the cause. I've been scouring the net trying to find … | |
Hello, Could someone please look at this code and tell me why it is not working. I am trying to retrieve the number that is stored in the "Hundredths" section of the system time and output it to the screen. Thanks. [code] .MODEL SMALL .286 .STACK 100h .DATA Typed DB … | |
I recently bought a nice shiney new laptop with widescreen 1080p. The problem is now when I compile the application and it is run on a non-widescreen monitor it displays incorrectly. In particular the controls that are anchored to the right and bottom are displayed too far off to the … | |
Hi, I used to have difficulty with more advanced bits of scope but eventually understood but after a long break from c++ i have of course forgotten bits. my problem is with this bit of code: [CODE]std::vector<int>::iterator it[/CODE] as i understand it this bit of code creates an iterator for … | |
I want to make it so when a person clicks a link it pops up asking "are you sure" and if you click no itll stop u from going further and leave u on that page and if u hit yet itll continue to a specified link (which will be … | |
Hi all I am using sqldatareader to read data from sqldatabase. The data is being shown on web forms with tabcontainer and tabs. The scenario is I have three rows of data for a client.I want to read row by row data on a button click event.I used while loop … | |
I just saw someone's program that assigned string this way: [CODE]string x("snow");[/CODE] It seems to work, as I could display the output x as "snow". Is this a legible way to assign strings? How does it differ from [CODE]string x="snow";[/CODE] ? | |
In a question i am required to add every other number starting from the right most side and going left on every other number. I have a code that is almost right as i am led to beleive. the code is: [CODE]#include <iostream> #include <cmath> int main () { int … | |
Hello People, I just came across this code as I was browsing through some C++ problem sets. This code gives compile time error but I am unable to understand the reason. I am C guy and my knowledge about C++ is not that great. So pardon if there is an … | |
Hello people, I have two classes everyone with private data. I want only one function from each class to access private data from another class. I have checked "friend" function but It needs the class object as an argument. That is making things complicated on my side and I have … | |
I want to call the input function, which works when I run it, but then I want to display the "temp" and "windspeed" variables in the main function and I don't know how to do this, im looking online at tutorials but im still confused. I guess I shouldn't have … | |
Hi, I would like to read data from an .asc file with a six-line file header. I just want the data without the header. I'd like to start at the 7th line and go until the end collecting the data into a single list. Each different data file I'm looping … | |
I have been working on converting this C/C++ Program as an assignment for my x86 assembly class, and for the love of anything good I can't figure out what is wrong. It doesn't have a problem when assembling or linking, but when I run it, it gives me: CS:0576 IP: … | |
Hello, I've an external/global array that is used every where in my code.[CODE] // global.h file short is_valid[10];[/CODE] I initialize my array somewhere in the code and I want to check if everything works. When I try to print the values of the array, I get segmentation fault. [CODE] // … | |
Hi I am trying to answer this question for my homework: [QUOTE] Populate a text file EmployeeDetails.txt (for 20 employees) with details of each employee on a single line. Details of an employee will consist of Name, Address, Age and Salary. Write a C++ or Java program to implement an … | |
Author: [I] ================================================================================ Crt Unit Read-Me By: Will DeWitt Jr. (edge@boink.net) Mar 21st, 2003 ================================================================================ BRIEF NOTES AND INFORMATION: This unit was created primarily to support my development of console mode applications under Delphi. I've tested this unit and had it successfully works under Delphi 2, 3, 4, 5, 6 … | |
This is a program that is meant to be a dice game with the computer, and this is what I have so far. I'm trying to make sure that I'm doing it right but I can't compile it to check because of a syntax error near the end of the … | |
hello , Im creating a top down game. Id like to know what is the formula for moving X and Y values N pixels in a specified direction (0-360) ? [CODE] int x=0; int y=0; int speed=3; // "n" int direction=45; //some formula ... //output x=3; y=3; [/CODE] | |
![]() | Hello, im trying to use a function inside another function and getting an error: The function: [CODE]# Function that recieves number of characters and calculate cost of advertising def costAd(numChar): if numChar >= 15: cost = 35.00 else: cost = 35.00 + ((numChar - 15) * 3.55) return cost costAd()[/CODE] … ![]() |
I tried to post on Mozilla's forum but I ran out of space, so I'll give this a try and thanks in advance... :) Also, I've googled til I cannot google anymore, so please be kind. :D I'm trying to call a .js file in my header where javascript would … | |
Program not running I'm not sure of he problem [code]//Employee.h #ifndef CLASS_H #define CLASS_H class Employee { protected : char *firstName; char *lastName; public: Employee (); Employee ( char, char ); //accessors //retrieve const char *setfirstName (char); const char *setlastName (char); //mutators //return const char *getfirstName (char); const char *getlastName … | |
hi any one try to tell me,, i created a button control ,, by double clicking only the process was going on,,when iam single click the button nothing is to be happenend,,so i want to change into single click insted of double click........ here my coding is given below....... [code] … | |
Hi guys, I'm using Crystal Reports here. In the development stage (not published), my application works perfectly. After publishing, my application also works perfectly but whenever the crystal report involves images (picture of an employee, for example), this error pops-up. [QUOTE] Access to the path <pathname> is denied. [B]Description:[/B] An … |
The End.