132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for hdb25

[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++
Member Avatar for flukebob
0
208
Member Avatar for arcticM

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
Member Avatar for arcticM
0
166
Member Avatar for charqus

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
Member Avatar for Mitja Bonca
0
120
Member Avatar for moroccanplaya

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
Member Avatar for moroccanplaya
0
78
Member Avatar for Transcendent

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++
Member Avatar for Shankye
0
167
Member Avatar for mzetka3

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: …

Software Development c c# c++
Member Avatar for Fbody
0
90
Member Avatar for rairai979

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
Member Avatar for rairai979
0
79
Member Avatar for bookmark

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
Member Avatar for Fbody
0
210
Member Avatar for tomtetlaw

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
Member Avatar for tomtetlaw
0
98
Member Avatar for jlego

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
Member Avatar for jlego
0
191
Member Avatar for hanvyj

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
Member Avatar for hanvyj
0
457
Member Avatar for Kiseki

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
Member Avatar for Kiseki
0
154
Member Avatar for n0de

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 …

Software Development c++ ios
Member Avatar for n0de
0
375
Member Avatar for Mike Bishop

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
Member Avatar for crapulency
0
171
Member Avatar for Rorkhill

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++
Member Avatar for Fbody
0
982
Member Avatar for sadsdw

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++
Member Avatar for sadsdw
0
136
Member Avatar for knellgust

[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++
Member Avatar for Fbody
0
80
Member Avatar for Mona..

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; …

Software Development c++ ios
Member Avatar for Mona..
0
259
Member Avatar for hassan_wah

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
Member Avatar for Luc001
0
178
Member Avatar for Transcendent

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
Member Avatar for Slimmy
0
147
Member Avatar for sciprog1

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
Member Avatar for sciprog1
0
176
Member Avatar for bookmark

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++
Member Avatar for Perry31
0
189
Member Avatar for SindujaArun

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 …

Software Development listview vb.net
Member Avatar for SindujaArun
0
87
Member Avatar for TonyMUK

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> …

Software Development c++ ios queue
Member Avatar for TonyMUK
0
137
Member Avatar for Mike Bishop

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
Member Avatar for Mike Bishop
0
5K
Member Avatar for blackcloudbd

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++
Member Avatar for blackcloudbd
0
179
Member Avatar for Sara Tech

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
Member Avatar for pavankumard2079
0
174
Member Avatar for skorm909

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++
Member Avatar for jonsca
0
146
Member Avatar for User4699

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 …

Software Development c++ ios
Member Avatar for Greywolf333
0
679
Member Avatar for testie

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
Member Avatar for richieking
0
106
Member Avatar for crisabraham

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 …

Software Development algorithm java
Member Avatar for JamesCherrill
0
125
Member Avatar for BasicGamer

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
Member Avatar for AndreRet
0
870
Member Avatar for fenomenal

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
Member Avatar for masijade
0
101
Member Avatar for SoulReaper1680

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
Member Avatar for AndreRet
0
167
Member Avatar for srikanth2321

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
Member Avatar for srikanth2321
0
140
Member Avatar for divakar.it

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
Member Avatar for AndreRet
0
130
Member Avatar for hdb25

[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++
Member Avatar for hdb25
0
173
Member Avatar for fernandomier

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
Member Avatar for everhett.raman
0
425
Member Avatar for dubery

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
Member Avatar for dvillase
0
117
Member Avatar for frankchester

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
Member Avatar for Perry31
0
245
Member Avatar for ashishkumar008

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
Member Avatar for kvprajapati
0
162
Member Avatar for bretthay93

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 …

Software Development gui python
Member Avatar for bretthay93
0
313
Member Avatar for Rickay

[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] …

Software Development c c# c++
Member Avatar for Rickay
0
231
Member Avatar for dlube

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++
Member Avatar for smrati.katiyar
0
102
Member Avatar for yogibear13

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++
Member Avatar for Greywolf333
0
288
Member Avatar for spartanace

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++
Member Avatar for Greywolf333
0
125
Member Avatar for blknmld69

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
Member Avatar for blknmld69
0
118
Member Avatar for Nicanor

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++
Member Avatar for frogn8r
0
831
Member Avatar for HoneyBadger

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
Member Avatar for HoneyBadger
0
101
Member Avatar for skorm909

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++
Member Avatar for skorm909
0
94

The End.