43,549 Solved Topics
Remove Filter ![]() | |
Hi I have just written this code (am just starting out with c++ so took a while :s) Works fine.... untill character 2 is created. When the program is run the character 1 is fine and every time the users is asked "Please enter x" they can and it is … Software Development c++ | |
I'm writing a deque implementation with ArrayList as required by my instructor. So far the body of the class looks like this [code=java] try { while (!endOfFile) { character = inputFile.readChar(); while (!character.equals('\u0003')) { if (character.equals('\u0008')) deck.removeBack(); else deck.addToBack(character); } } while (!deck.isEmpty()) { character = deck.removeFront(); if (character.equals('\u0003')) System.out.print("\n"); … Software Development java | |
I have been told to sort an array of structure(student) depending on one of its members(per) using bubble sort. I need to sort the 'student' structure in descending order of 'per'. Please help. I'm stuck!! [CODE] #include<stdio.h> #include<conio.h> struct student { char sname[20],dept[25]; int rollno; float per; }s[30]; void accept(int … Software Development c | |
I wrote this program for a class, the only problem is that it returns the anwser for assessmentValue twice. I can't figure out what to do to fix it...please help!! [code=php] def main(): #Get the actual value for the property. actualValue = input ("Enter the actual value of the property:$") … Software Development python | |
First off, I do want to state that I have read the forums and have not found an issue directly regarding this exact problem, though it is possible I may have overlooked it or something and if so please just point me in the right direction and I will leave … Software Development c++ | |
hello guys.. can u help me in my code that if i change the value of empno all the corresponding data in the empno the empname, empaddress and so on will also change because i can't figure out that when i change the value it will also change all the … Software Development vb.net | |
Hi, I would like to get some suggestions on how to change this program from array to vectors. This program reads an ASCII input file and outputs the character frequency into a text file. I got it to work with the arrays, but I can't figure out where to do … Software Development c++ file-stream | |
Forward referencing is allowed during declarations when the undeclared variable is used in the LHS of an expression, but not if its in the RHS. Therefore, the following won't work : [CODE]class A { int a=h; int h; }[/CODE] But the following code works : [CODE]class A { int a=this.h; … Software Development java | |
Is it true that during autoboxing, the type.valueOf() method is called (which creates a new object only if another with the same primitive constant is not in the intern list. This applies to cases where interning is allowed. Otherwise, it creates a new object using new() ). Is this right … Software Development java | |
Hi, I want to convert a string to numbers ... i tried a lot of codes.. iam a beginner... Kindly help... Ex: a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 input value -->abc output value --> 123 input value -->abcj output value -->12310 I mean i want to … | |
please help me how i would write these two programs. im learning c++ and am having difficulties, if anyone can help i will greatly appreciate it. Write a C++ program that displays the results of the expressions 3.0 *5.0, 7.1 * 8.3 – 2.2, and 3.2 / (6.1 * 5). … Software Development c++ | |
Say I have a class: [CODE]class foo { public: foo(); int len{return 1}; }; [/CODE] Then in main I have a class pointer: [CODE] foo *var[5]; [/CODE] My question is when do class pointers get initialized? Or do they not? How would one initialize them? Software Development c++ | |
Hey guys, I think I have a pretty simple fix here, I just need somebody to point out my error. I'm getting a seg fault after writing to an array of char. I need my function to run through the array and find pairs. If every char in the array … Software Development c++ | |
Hi! Having some major issues my homework assignment. I have to end this while loop when detecting two consecutive newline escape sequences in a row. This is the word problem: Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice … | |
what my code does is it waits for the user to type in "led" and performs the blink function. what i am trying to do is introduce the letter 'p' as a command to stop the blinking. what happens is that blink is only executed once. [CODE]if (!(strcmp(userinput, led))){ //condition … Software Development c | |
We have an assignment to write a program finding the nth Fibonacci number. On the web, there are some standard mathematical equations for this, but that would just defeat the purpose of this assignment if I use those formulas. I have my current code down here(with some sketchy back up … Software Development java ![]() | |
[CODE]a.cpp: In function ‘int main()’: a.cpp:39: error: no matching function for call to ‘find(int&, int)’ [/CODE] [CODE]#include <iostream> #include <fstream> using namespace std; int minutes, seconds; char temp; int array_l; bool* sees; int* a; int saade; int main() { ifstream sisf("raadio.sis"); ofstream valf("raadio.val"); /* * How many songs? */ sisf … Software Development c++ | |
Hi I'm currently writing an Othello game using the Windows API. I have 3 classes in my program, the first class is simply called "Othello" and it handles almost everything. I also have a class called Field that's used to control which fields are black which are white etc. My … Software Development api c++ windows-api | |
particularly from a txt file. for example if the file reads "name ###-####-#### address" all in one single line. how do i put all three items in three separate variables and print them? Software Development java | |
Can anyone give me some ideas on how to find the middle value between 3 numbers.? I really dont know how to start... I know how find minimum and maximum but finding the Middle value is kinda hard for me... For those C Wizards give me some idea advice please?., … Software Development c | |
Ok I have the Hwnd to a particular window I want to work with. Lets call this windows program the "UNWANTED". This UNWANTED window has two things I wish to identify it by. The first one I already have.. which is it's windows handle! Second.. is what I need to … Software Development c++ | |
Hi guys ive got a problem in my Tab control. you see, i have 2 tabs in my form then inside it i i got a [B]ListView[/B]. What i want to do is when a user clicks on the [B]First Tab[/B] some buttons in my form will be disabled but … | |
Program descr: Im trying to make a windows manager for windows I might draw in CONSOLE. the plan is to draw manually windows in the console in an objectified way. instead of drawing the windows using console coordinates I create a buffer then use [URL="http://msdn.microsoft.com/en-us/library/ms687404(VS.85).aspx"]writeConsoleOutput[/URL] to write this buffer to … Software Development c++ window-manager | |
I looked all over Google, but could not find anything other than: [CODE]File.WriteAllLines();[/CODE] It does not work, it just appends it. Cheers. Software Development | |
Is it possible to use a timer to be able to count up, stop, and count down and be able to change the speed on the fly? Trying to make a simulator program that behaves like the real unit. The count also needs to stay in the 0000 format. ie; … Software Development vb.net | |
hi there! i'm have a biiig trouble. I've make a simple chatbot, as can learning. The problem is, that I can't insert data into the dictionary without a error. here is the code: [CODE] codes = {} def arraycompare(array1, array2): l = 0 for i in array1: for j in … Software Development python | |
[CODE]class hello { } class hello1 { public static void main(String aa[]) { hello ob[]={new hello(),new hello(),new hello()}; hello ob1[]=ob.clone(); // 1 } }[/CODE] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default … Software Development java | |
Hello everyone! I have this code [CODE] string constring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DataBasePath + ";Persist Security Info=False;Jet OLEDB:Database Password=""; conn = new OleDbConnection(constring); conn.Open() string searchstring = "SELECT * FROM MyTable WHERE field2=@field2"; OleDbCommand cmdsearch = new OleDbCommand(searchstring, conn); OleDbDataReader reader; cmdsearch.Parameters.AddWithValue("@field2", dgrDoc[1, index].Value.ToString()); reader = cmdsearch.ExecuteReader(); [/CODE] How … Software Development c# open-source | |
Will the older c++ commands (leaving that of conio.h) work with a new compiler like g++ if i use "using namespace std;" and use 'int' with main() rather than 'void' and don't use .h for including a header file? Software Development c++ | |
im writing this program for an assignment and im getting errors can anyone help make some suggestions? i have to have the program print out balances for saver1 and saver2 then change the percentage rate then reprint [CODE]//header definition file for savings account #ifndef SAVINGS_ACCOUNT_H #define SAVINGS_ACCOUNT_H class SavingsAccount { … Software Development c++ | |
im having trouble pin-pointing why my loop continues to execute infinetley. can someone point out what im doing wrong in my dowhile loop? [code=cplusplus] #include<iostream> #include<string> using namespace std; int main() { string command; char again; do { cout << "Welcome to the Intrepeter!" << endl; cout << "Please feel … Software Development c++ | |
I have the following funtion in my ComboBoxControl class, and it only returns to me the control of the comboBox. The foreach works fine but my problem is how to return the ComboBox, becuse if the ComboBox doesn´t exists I need to return NULL or something else. How can I … Software Development | |
i get an error when i try and do this. [code=c] private void button2_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); DBconnect db = new DBconnect(); Global.GlobalVar = textBox1.Text; string Co = new Password('J', textBox1.Text).SetSql(); ds = db.GetDataSet(Co); DataTable dt = ds.Tables[0]; if (dt.Rows.Count == 0) { if … Software Development data-protection dataset programming-construct | |
hi, How to find Date Differance in c#. in vs2008. thanks in advance. jack Software Development c# | |
Hey there, so im making a calculator to make my life a little bit easier ^^ so far its working well, I just got one problem o.O! If I enter a number with a comma like 0,5 into one of the textboxes and click calculate it will terminate, what can … Software Development | |
Hi, If I have a std::vector of objects and I need to iterate through all its elements, is it faster to do: [code] for (vector::iterator i = myvec.begin(); i != myvec.end(); ++i) //blah [/code] or [code] for (int i = 0; i < myvec.size(); ++i) // myvec[i] blah [/code] Or … Software Development c++ | |
I have a problem referring to Geometric progression Using a few mathematics formula I have to compare the value En that I calculate using Sinfinite and Sn. This value En(which determines accuracy of the calculated number I believe) should than be compared to an arbitrary value E. When En becomes … Software Development c mathematics | |
i m unable to interrpret my package from any other drive???? i mean ..i hav created my package, compiled it bt unable to run it... can anyone tl d way of running it or setting the path... the coding is done in command prompt Software Development java | |
I am using python code to transmit data collected (Wii Nunchuck) via I2C wirelessly to another wireless node and then display the information about button press and also roll, yaw and pitch (X,Y,Z) data. The code uses Wx python for frame/window display. Part of the code was copied from the … Software Development python | |
I have data stored in a deque that I wish to write to disk using fstream. So far this is the test code I have written. [code] int j = 10000; deque<double> m_data; for(int i = 0; i < j; i++) { m_data.push_back(i); } std::fstream myfile; myfile.open ("data2.bin", std::ios::out | … | |
This seems to be the appropriate thread to post my problem in: I'm also trying to bind to a ReportViewer object, however I'm not binding a stored procedure but dynamic sql that selects <dynamic columns> from <dynamic views or tables> nice huh? My boss has fallen in love with the … | |
I know that it's a very undesireable scenario, but I need to create a database straight from java code. Yes, a database. Not a table. A database. The database will be dropped at the end of the program and will never be directly touched by the user, so all I'm … Software Development java | |
Hi all, Is there a better way of doing this, I googled it and found de IsNumeric, but it´s for VB and not recommended for C#. Let me explain: I have a string like "something123" and I need to get only the 123 value as a string from the string. … Software Development | |
ive implemented a couple of functions for an assignment for class. i have an add function which adds students, id's, and universitys and have "tried" to add a get id function which should search the list, find a specified id, then return it. unfortunately, when i try to run this … Software Development c++ | |
I'm writing a program to keep record of my e-books and to open them. I have a record declared in Delphi 7 like this. [CODE]BookLibrary = record AuthorName: String[20]; BookName: String[20]; PDFLink: String[200]; end; [/CODE] Now my question, is it possible to edit a record later on so that one … | |
Dear all, I have a form with 36 comboboxes, and I use this fucntion to update them: [CODE] private void controlBox(string boxName) { foreach (Control frmControl in this.Controls) { if (frmControl is ComboBox) { if (frmControl.Name == boxName) { ComboBox _bx = (ComboBox)frmControl; _bx.Items.Clear(); _bx.Enabled = true; _bx.Items.Add("It Works!"); } … Software Development | |
Hello.. I am using visual studio 2010 MFC. in my programm i need to set 4 bit value in hex. exaple: i have hex value 64, it should desplay 0064 A = 000A 3E8 = 03E8 Is there any function in vc++, which set 0 ? Thanks. Software Development c++ visual-studio | |
How is it possible to get the Exception Error as a string in the catch event ? The thing is that I get an exception and now want to know what the problem is and what the exception is saying. [code] try { //some code } catch(Exception ex) { //How … Software Development c++ | |
I'm writing a program that parses tcpdump output files. I have a tab delimited text file that contains MAC addresses and hostnames. How can I have the program search this file for a MAC address and then return the corresponding hostname? Any help would be appreciated. Thanks. Software Development c++ |
The End.