132,726 Archived Topics
Remove Filter ![]() | |
[CODE]#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> #include <string> using namespace std; int dectoint (string st); int hextoint (string st); int bintoint (string st); string inttobin (int n); string inttohex (int n); int main() { string st; cout<< "Enter a number in dec,hex,or binary: \n"; getline(cin,st); if (st[0]=='$') cout … Software Development c++ | |
![]() | Hey everybody! in the book "Head First C#" there's a code for a program that is a fast typing game. for those of u who don't know it here are few details: there's a listBox and using a timer, random letters are added to the listBox until there are 7 … Software Development ![]() |
Hello guys. I have 2 Windows Forms. Let's say, the first form is like a intro ... ( you know, when you enter in C#, a green window appears for some seconds ). Ok, i use a timer, and after 10 seconds from starting the application, i try to close … Software Development window-manager | |
hi i can copy text based files to other files but when it comes to images i cant copy them it gives me a distorted image. [CODE] printf("please give your archive a name:\n"); scanf("%s", &archive_name); create_pointer = fopen( archive_name, "wb"); printf("please type in the path for the file you want … Software Development c | |
for example 1*2*3*4*5*6 this is what i have: [CODE]#include <iostream> using namespace std; int main(){ int num =1; int i; for (i=1; i <=20; i++) { num *=i; cout<<num<< " * "; } system("pause"); return 0; } [/CODE] Software Development c++ | |
I'm new in c++ so please be patient. ;) I'm trying to create abstract fabric. My errors: [ICODE]1>ObslugaOkna.obj : error LNK2019: unresolved external symbol "public: __thiscall Figury_Produkoj::Figury_Produkoj(void)" (??0Figury_Produkoj@@QAE@XZ) referenced in function "public: static long __stdcall ObslugaOkna::WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@ObslugaOkna@@SGJPAUHWND__@@IIJ@Z) 1>C:\Documents and Settings\Mati\Pulpit\Nowy folder (4)\grs\Debug\grs.exe : fatal error LNK1120: … | |
Hello, I'm using SQLBulkCopy to import data from a text file. There is a lot of data involved and I would really rather not import it row by row. There seems to be a problem with fields containing both numbers and text. (for example, a phone number '555-1212'). All fields … Software Development vb.net | |
Hi, I'm trying to get this program to read a file which contains a matrix. I am trying to output a text file which has the matrix of the input file but with the average of each row. Every time I enter the name of the inputFile and the outputFile … Software Development c++ matrix-multiplication | |
Is there a way to ensure that all un-initialized pointers automatically have the address 0x00000000? Sometimes they're being set to other addresses but still being unitialized, and they pass tests like if(!ptr), causing an unhandled access violation error. Software Development c | |
Im not familiar with the correct terminology to use with this. I have a form that i need to use in two different projects, and the form can remain identical for each project. I have read that there are code bases in other ides, where i could make a shared … Software Development vb.net | |
Ok, im gonna go ahead and just paste most of the stack trace in, (its massive) : java.io.NotSerializableException: com.sun.java.swing.plaf.windows.XPStyle at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) at javax.swing.JComponent.writeObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at … Software Development java java-swing | |
Im currently running out of ideas at the moment and need some suggestions or ideas. [B][I]The alert (a popup) should be generated when the time at which the call-back time has been requested is in 1 minute from the current time.[/I][/B] My current program uses a while loop which keep … Software Development java | |
Hi, been programming all day long, and tryed to compile my program, everything is fine, except some kind of nonsense with ofstream.. These are the problems, and i don't know why ofstream says such things, because in my other programs everything is fine with seekg, or tellg, and everything else … | |
I have an sql table called Stock with two fields called StockID and StockCode. I want the user to select the stockcode from a combo which in turn populates the stockid for that item into a lable on my form. I have already populated the stockcode into the combo but … Software Development dataset sql vb.net visual-studio | |
Im creating a program in Dev C++ and the program has a switch statement in it to take the user to a differ 'page'. For example the user presses 1 and it takes them to a page that deals with orders etc. E.g. [CODE]switch(mainmenu) { case '1': Menu1(); break; }[/CODE] … Software Development c++ | |
Hi friends, I have 3 different vectors, V1, V2 and V3. V1 and V2 have the same size and each line refers the same record. I would like to write a function that get each line from V3 and check if exists in V2, and if is == "M" in … Software Development c++ | |
[CODE] #include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const {return title;} double getPrice() const {return price;} bool hasKeyword(string key); }; Book::Book() { title="None"; price=0; } void Book :: setTitle(string s) { title=s; } … Software Development c++ | |
hi.. i write this statement there is no errors but it not showing me the out put this is the my code: [CODE] #include<fstream> #include<iostream> using namespace std; int main() { fstream infile; fstream outfile; infile.open( "classnames.txt",ios::in ); outfile.open( "bufferednames.txt",ios::out ); infile.unsetf( ios::skipws ); int ch; for( int i=0; i<4; … | |
Hi, I am working on a project in VB.net 2008. I have a problem arising while opening a form as modal from a modeless form. I have attached a project to demonstrate the problem. This demonstration contains three forms with following characteristics. - “Form1” is main form of the demo … Software Development vb.net | |
What is the difference between writing a application java program and a java program? I was asked to write an application java program and then I was asked to write a java program(s). Which is just one program and which is the one with that has to have two files … Software Development java | |
Hello Members, I am trying to understand the pipe() system call. I found this program online: [CODE] #include <unistd.h> #include <stdio.h> #define MSGSIZE 16 char msg1[] = "hello #1"; char msg2[] = "hello #2"; char msg3[] = "hello #3"; main() { char inbuf[MSGSIZE]; int p[2], j; /* open pipe */ … Software Development c | |
Hi, I'm trying to make a program that reads a text file that contains about 4 rows of numbers and outputs the average for each row. I need help with these two errors. It is not complete but I need help on these so I can continue. Any help is … Software Development c++ | |
Hi all i have a listview with few records im able to delete the records from the listview but after deleting the record the listview is not getting refreshed pls me to solve this.... Here is the code: [code] If frmName = "frmcust" Then If del_CustCode.Count >= 1 Then If … | |
This is driving me mad. This program reads 8 records from an iseries data queue and then I get the segmentation fault. I can't work out why. Does anyone have any ideas? Please!! [CODE] #define WIN32_LEAN_AND_MEAN // Include the necessary DQ Classes #include <iostream> #include <fstream> #include <windows.h> #include <cwbdq.h> … | |
I have the following code that will update one field called RCon in sql, does anyone know how i can update a few at the same time? i would like to update the sql field (called stockdesc) [CODE] Dim con As New SqlConnection Dim cmd As New SqlCommand Try con.ConnectionString … Software Development open-source sql vb.net | |
Can any one help me with these codes: i m freaking out here I split my program in 3 parts. 1. main - prac.cpp 2. interface - base.h 3. implementation - base.cpp in prac.cpp the code is: [CODE]#include <iostream> using namespace std; #include "base.h" int main(){ Base ob; ob.set(); ob.get(); … Software Development c++ | |
I work with Visual basic 2010 express and Sql server 2008 Express I established Person and Specialist tables data base .I want to make Insert /update/ delete Here object declarations in a module : [CODE] Public str As String 'string sqlcommand Public con As New SqlConnection("Data source =Sara\SQLEXPRESS ; initial … Software Development dataset vb.net visual-basic | |
Basically what I'm trying to do is simple. My main problem is the random numbers, but in the comments i have some other issues... if you know how to fix them that would be great the other two main ones im having trouble with are: the do loop until the … Software Development c++ | |
I'm trying to implement a maze program by using nodes that reads in a file and the user is able to enter a direction and solve the maze. My class will not output correctly and I've been working on it for a LONG time. Any help is appreciated! I also … | |
Hey guys, this code is supposed to remove all the spaces at the end of each line. However from what I can tell it prints out the exact same file again instead of removing nothing. Have I been using the wrong test files? Or is there something wrong with my … Software Development python | |
I am doing a project on developing a one time password system. In that, I have to encrypt a counter value and secret key together by HMAC SHA 1 algorithm. But the counter value and key need to be stored very safely on the server. Is there anyway by which … | |
I was wondering, how exactly would I go about doing that. I want assign the arrow keys to command buttons. For Example: Command1 would be the UP arrow key, command2 would be the LEFT arrow key, command3 would be the RIGHT arrow key, command4 would be the DOWN arrow key. Software Development visual-basic | |
I have to create a class that will pick partners at random for my class tomorrow, out of the people that are in it. What I have so far is simple enough... [CODE]import java.util.*; import java.util.Random; public class GetPartners { public GetPartners() { } public void getPartner() { String[] names … Software Development java | |
Hey, whenever I compile the code below the program compiles and runs but after a while I get the following error: System.IndexOutOfRangeException was unhandled Index was outside the bounds of the array. Also, when compiling I get the following: A first chance exception of type 'System.IndexOutOfRangeException' occurred in array_mult.exe The … Software Development visual-basic | |
Hi I have problem in reading xml file. The things what I want to read is : "cmpd_name","cmpdnr","rt","mz","i","a","sn","z". Here there may be several values for each "mz","i","a","sn" in different lines under a "cmpd_name" (It will be clear if you see the attched xml file). Each of these ("mz","i","a","sn") values under … Software Development xml | |
Hi Andreret, As per the dicussion today on my previous thread, i am creating a new thread for the function to convert the numbers on the grid to a date. I am waiting for your code. Kindly share once you done tomorrow or the day next Software Development visual-basic | |
[CODE]#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> using namespace std; int dectoint (string st); int hextoint (string st); int bintoint (string st); string inttobin (int n); //string inttohex (int n); //string inttodec (int n); int main() { string st; cout<< "Enter a number in dec,hex,or binary: \n"; getline(cin,st); if … Software Development c++ | |
Hi: I am using Canon SDK for camera control. Everything works fine until I start using timers or delays. Let me explain: If I use a regular button to call the take_picture method on the SDK everything works fine. But when I use a Timer, DispatcherTimer or any other kind … Software Development | |
Hi all I need to write a recursive function that displays every permitation of NxN numbers this example uses 3x3 and will display 0 1 0 1 1 0 2 1 0 0 2 0 1 2 0 2 2 0 0 0 1 1 0 1 2 0 1 … Software Development c | |
When I run this program, and the file can be found, it works fine. However when the file is not there I get the error: Debug Assertion Failed! Expression (str != NULL) It seems to be a problem with the following loop as when its remove it works fine: [code=c] … Software Development c | |
helloooo Actually, i have one question. my teacher asked to me - why we take Int16,Int32,Int64 why not Int20,Int36,Int68. Please tell me the answer. Pleaseeeeeeeeeee.... is the factor operating system like 32-bit,64-bit,16-bit? please give anyone exact answer. Software Development operating-system | |
i want to make a program that has a player take on the computer in a game of Rock Paper Scissors. The GUI should have an appropriate lable at the top. it should allow the player to select his or her weapon of choice. program should have a fight button … | |
[CODE]#include <iostream> #include <windows.h> #include <ctime> using namespace std; double time1; int main() { const double seconds1 = time(0); string string1; while(1) { long double seconds2 = time(0); if(seconds2 == seconds1 + 5) { cout << "Five seconds went by.\n\n"; break; } } cin.clear(); cin.ignore(255, '\n'); cin.get(); return 0; }[/CODE] … | |
how would you write a for loop that calculates the total investment over 40 years if a one pays $500 each month but every 2 years the payment increases 10%? Software Development c++ | |
Hi, I have a problem where I have to create a class called Employee and calculate things such as pay etc..Part of the problem is to override the stream insertion operator, and I did, but I have a problem with the syntax of printing something out. I have a method … Software Development c++ | |
Im having a bit of a problem with my binary search tree. For some reason my pointers arent connecting correctly. I'm pretty sure everything is correct but when i run it I keep getting this as the result. It inputs the numbers 1 5 7 9. [CODE]void insert(string word,vector<treeNode> &x) … Software Development c++ | |
How can I change the code below to applet? [CODE] import java.awt.*; import java.math.*; import javax.swing.*; import java.awt.event.*; public class Timer extends JFrame { JButton start = new JButton("Start/Reset"); JButton stop = new JButton("Stop"); JLabel time = new JLabel("Time"); javax.swing.Timer timer; int count = 0; public Timer() { super("Timer"); addWindowListener( … Software Development java java-swing | |
Trying to compile a program, in my accounts.cpp I have 2 errors accounts.cpp:240: error: name lookup of `a' changed for new ISO `for' scoping accounts.cpp:234: error: using obsolete binding at `a' here's the code bool cAccount::IsOnline( int acctnum ) { if (acctnum < 0) return false; map<int, acctman_st>::iterator iter_acctman; if … Software Development c++ | |
It's been a while since I bugged you guys. But I need the council of my wise advisers once more. I am trying to write a program that reads a .txt file, breaks each line into words, strips the whitespace and punctuation from the words and returns them in lowercase. … Software Development python | |
so basically whats happening is its saying that im trying to call on the function before it appears... here's the code: [CODE]# include <iostream> # include <cmath> using namespace std ; char name [40]; // lets the players name be up to 40 characters int choice; int goblin = 250; … Software Development c++ |
The End.