43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Run.[it]

Im trying to carry out input validation on a piece of code and have come across an issue. Basically for the 1st input I used getline for the string and then for the 2nd input I use cin for the integer. I am aware you can convert the integer from …

Software Development c++
Member Avatar for Run.[it]
0
182
Member Avatar for daviddoria

I want to do something like this [code] #include <string.h> #include <iostream> using namespace std; int main() { MyFunc("test"); return 0; } void MyFunc(const char* Filename) { cout << strcat(Filename, ".tst") << endl; } [/code] but it tells me that my const char* cannot be used where it is expecting …

Software Development c++
Member Avatar for Narue
0
106
Member Avatar for Nemoticchigga

[CODE]String^ comPort = "COM" + this->RS232CommPortNum->Value; int baudRate = Convert::ToInt32(this->cbBaudRate->Value); com = gcnew SerialPort(comPort, baudRate); try { com->Open(); } catch (...) { ::MessageBox::Show("Invalid Port"); }[/CODE] How do I handle this excepion thrown when the com number is not valid? When I run the release version it has an error when …

Software Development c++
0
63
Member Avatar for DREAMER546

hi i'm having a problem when i use pointer to pointer i've tried my best to make this work .. but it didn't i've got a run time error! PLEASE .. Please .. please i need help :'( if any one have tutorial about how can i work with pointer …

Software Development c++
Member Avatar for DREAMER546
0
131
Member Avatar for veledrom

Hi, How can i call a Oracle Stored procedure in vb6? Stored procedure : [code]ADD_SP (1, '1', 1, 1, 'abc')[/code] Thanks

Software Development oracle visual-basic
Member Avatar for veledrom
0
139
Member Avatar for D boss

hi guys, i have created a class which has a couple of buttons and each button calls a public class, class B4 is a button and it calls up the Printdata class, the Printdata class, then gets data from the database carpark and stores it into a file.txt as B4 …

Software Development file-system java java-swing
Member Avatar for D boss
0
114
Member Avatar for buddy1

I have this program I have to write about adding binary numbers. Here is the write up: "Defining a binary number as int binNum[8]; write a C++ function void binaryAdd(int* sum, int& cBit, const int* bin1, const int* bin2) to compute sum as the sum of the two binary numbers, …

Software Development c++
Member Avatar for buddy1
0
265
Member Avatar for Triggerhappy41

Hi, beginner here making the move from Java to C++ and having troubles (of course) with const and pass-by-reference. I'll show you the code I'm working on: Card.h: [CODE]#include <iostream> using namespace std; class Card { friend ostream& operator<<(ostream& out, const Card& c); public: Card(char aSuit, int aPower); void setSuit(char …

Software Development c++
Member Avatar for Triggerhappy41
0
145
Member Avatar for jbennet

My bootsector is meant to print something - it does, but wierd characters follow it? e.g the spades symbol [code] ; Boot.Asm ; Tell the compiler that this is offset 0 - it isn't offset 0, but it will be after the jump. [ORG 0] jmp 07C0h:start ; Goto segment …

Software Development assembly
Member Avatar for jbennet
0
118
Member Avatar for k2k

would anyone please tell me how i cp the whole directory to another directory without the originalDir name.... ex: say the original contains multiple directory contains multiple directory.. and files how do i copy everything from one directory to another directory i tried cp -r /home/henry/originalDir /home/henry/newDirectory..... however my newDirectory …

Software Development shell-scripting
Member Avatar for Salem
0
93
Member Avatar for BiNO

Hi I have Borland Jbuilder 2006 Enterprise installed on a Microsoft Windows Vista Home Premium OS. I was trying to make the font bigger (in the preferences menu) but something happened and now the font is very small, too small to even click on a button. (I'm not talking about …

Software Development java microsoft-windows windows-vista
Member Avatar for BiNO
0
89
Member Avatar for NycNessyness

Hello once again everyone. I would like to know if anyone could assist me on how to insert text from a JFormattedTextField and an item from a JComboBox and place them into a JTextPane. If the user enters an item name like Shoe in the JFormattedTextField and then selects an …

Software Development java
Member Avatar for NycNessyness
0
138
Member Avatar for VernonDozier

I am trying to write a simple "Hello World" to the console. I created an empty C++ project in Visual C++ 2008, and added this one file: [code=cplusplus] // main.cpp using namespace System; int main () { Console::WriteLine("Hello World"); return 0; } [/code] I get this error: [code] Error 1 …

Software Development c++
Member Avatar for VernonDozier
1
3K
Member Avatar for VernonDozier

I am trying to learn Visual C++, particularly the GUI components, so I tried to make a simple program where a button is displayed to a frame and when the button is pressed, a cout statement is invoked which displays a message to the console saying that the button has …

Software Development c++ gui
Member Avatar for VernonDozier
0
704
Member Avatar for bhoot_jb

i am writing a code for a stack within stack...or nested stack...whatever.. in the code..and the mainstack is a stack of substack, which in turn, is a stack of integer data.. i thought of using class template for both the stacks - mainstack and substack..but am confused with how to …

Software Development c++
Member Avatar for bhoot_jb
0
117
Member Avatar for siripong153

I'd make a basic C rpg game and I want to save data such as Exp, name, gold, ect. How can i do it in C? I went to c++ forum and saw it but fstream doesn't work on C. thank You

Software Development c
Member Avatar for jephthah
0
152
Member Avatar for ramiljoaquin

Hi! I don't have access to office on the server. Does anyone know an open source way to generate an xls file for download? Or is there any way of generating a file that upon download will auto open into excel? Thanks ramil

Software Development open-source
Member Avatar for ramiljoaquin
0
135
Member Avatar for timdog345

[code] //pg 368 #1 /* void initialize (double& h, double& r) { h=0; r=0; } void getHoursRate (double& h, double& r) { cout<<"please enter how many hours you worked. "; cin>>h; cout<<endl; cout<<"please enter your rate. "; cin>>r; cout<<endl; } double paycheck (double h, double r) { double overTime, finalAmount=0, …

Software Development c++
Member Avatar for Nick Evan
0
131
Member Avatar for kinyuadave

Hi there i've just known how to make an exe file now what am asking is how to change the icon of the exe from the default one to one of you choise like in the one cd access program.

Software Development visual-basic
Member Avatar for kinyuadave
0
160
Member Avatar for kousarrabiya

Hi, Iam trying to put username and password in some dat file(ADMIN.DAT)from changeLogin page and getting/retreiving username and password from another page from ADMIN.DAT file.... My problem is username and password details are getting stored in dat file in readable text format NOT IN BINARY.. Writing into file part is …

Software Development file-system visual-basic
Member Avatar for kousarrabiya
0
114
Member Avatar for sonia sardana

How to add time in the format 00:00:00 in vb.net

Software Development vb.net
Member Avatar for sonia sardana
0
61
Member Avatar for axn

i can write to the file with no issues, but cant read. i have defined the file to append so as not to overwrite data. then i write to it [B]log_file.writelines(lines)[/B] but the reading wont work?? [B]log_file.readlines(lines)[/B] and thought i could just use log_file = open('%s' % os.path.join(logfile_path, file), 'a+r')

Software Development python
Member Avatar for bvdet
0
104
Member Avatar for LevelSix

Question: Write a program that draws a clock face with a time that the user enters in two text fields (one for the hours, one for the minutes). I have Followed my example code, and come up with 3 classes. Clock, which sets the outines for drawing clock objects, ClockViewerFrame …

Software Development java java-swing
Member Avatar for LevelSix
0
141
Member Avatar for Lukezzz

I want to delete a Folder that consist of .txt Files. I am trying with this code below but the member :: Delete says that it only can emty an emty folder but this folder contains .txt files. So I wonder what other technique could be used ? [code] System::IO::Directory::Delete( …

Software Development c++
Member Avatar for Lukezzz
0
209
Member Avatar for Onixtender

Hello, I've got a question how to change this function, because it should read f.e. two lines: 33333n5rr door 3333is closed 3333333 n5rrr [COLOR="Red"]nanana[/COLOR] tt4tt [COLOR="Red"]wall[/COLOR] t6tt6t then transform to: nrr dooris closed nrrr tt[COLOR="red"]nanana[/COLOR]tt t[COLOR="red"]wall[/COLOR]tt[COLOR="red"]wall[/COLOR]t (writing word instead of a digit was: nice ttt5555ttt //to: ttt[COLOR="red"]nice[/COLOR]ttt,deleting digits in first …

Software Development c
Member Avatar for Onixtender
0
142
Member Avatar for blacklocist

Hi All, I have a question and can't seem to find a answer anywhere. A normal function can void or return a object. [CODE] public void CoolFunction() { [INDENT]//Some Code[/INDENT] }[/CODE] I know you can do this. [CODE] public int ReturnOneObject() { [INDENT]return intNumber[/INDENT] }[/CODE] What I can't find or …

Software Development
Member Avatar for ChaseVoid
0
386
Member Avatar for Jennifer84

This code Gets the last Write Time from a .txt file. My Question here. [B]1.[/B] When doing that operation. Will this file be opened or is the file closed ? [B]2. [/B]If the file was opened will the file Close automatically after the Check ? [code] CurrentSourceTime = System::IO::File::GetLastWriteTime(SourcePath); [/code] …

Software Development c++
Member Avatar for Jennifer84
0
215
Member Avatar for k2k

i used vi: %vi shellProgramming and then i typed the shell script in the vi and saved with :wq However, when i run the vi file ...... %shellProgramming my unix says "command not found" why is that? and how do i run the vi shell scripting file? thanks

Software Development shell-scripting unix
Member Avatar for eggi
0
161
Member Avatar for NycNessyness

Hello. I asked last week about how to allow the user to only enter in letters. I tried the mask formatter but that's too limited. How can I go about letting the user to enter in any kind of letters they want but restricted to only 25 letters for their …

Software Development java
Member Avatar for Ezzaral
0
119
Member Avatar for timdog345

[code] //test SAT /* void initialize (int& verbal, int& writing, int& math) { verbal=0; writing=0; math=0; } void userInitialize (int& verbal, int& writing, int& math) { cout<<"Please enter your verbal score (0-800) "; cin>>verbal; cout<<endl; cout<<"Please enter your writing score (0-800)"; cin>>writing; cout<<endl; cout<<"Please enter your math score (0-800)"; cin>>math; …

Software Development c++
Member Avatar for Nick Evan
0
146
Member Avatar for ymf

Hi, I am writing a cgi script for a web database query "results" page and I need to display the results in an html table. My question: 'Is there a way to print out a list of words without the commas and the square brackets?' e.g if this is the …

Software Development python
Member Avatar for Freaky_Chris
0
104
Member Avatar for savinki

Hi, I want to assign a char pointer value to enmerated value, to use in a switch statement. Given below is the code segment. I dont hv an idea how to convert and assign char pointer value to a enumerated value. Pls can someone help me to resolve this [code=cplusplus] …

Software Development c++
Member Avatar for Duoas
0
156
Member Avatar for tondeuse34

Hey guys, i got another question. say if you want to only write a few lines of code that can be called on at any time the while the script is running, i'm assuming its the pickle function or something similar to batch like the goto function? Thanks

Software Development python
Member Avatar for tondeuse34
0
131
Member Avatar for Jennifer84

I am doing a loop that will run all the time and when a change is done to the File(Source), then this file will be Copied/OverWrite file(Dest). One problem that I have is that the if-statement that says: [B]if( CurrentSourceTime != LastSourceTime ) {}[/B] is running each loop ? I …

Software Development c++
Member Avatar for Jennifer84
0
109
Member Avatar for Mackjan

Hi I have got the TypeError. I use lists at the same way in my other programs it works excellent, but just in this program I have got problem don’t know how to solve it? [COLOR="Red"]Traceback (most recent call last): File "E:\extra_b.py", line 42, in <module> ordna(pile) File "E:\extra_b.py", line …

Software Development python
Member Avatar for woooee
0
157
Member Avatar for xyinyangx

I am in a c++ programming class in my High School, and I am having some trouble with the final I was assigned. We were assigned to make a video game, so I decided to make a text adventure. My code is basically a bunch of if statements telling the …

Software Development c++ session video visual-basic
Member Avatar for xyinyangx
0
764
Member Avatar for Kob0724

I"ll preface this with the fact I'm pretty new to C++ (my background is in Java, so having to deal with these pointers is proving to be a little confusing). I'm trying to iterate through a vector that I passed to a function. I can't get this code to work …

Software Development c++
Member Avatar for Kob0724
0
271
Member Avatar for daviddoria

This doesn't seem to behave as I would expect (as it does in matlab, for example). I want to execute a command, but give some readable output instead of the often very messy auto-generated error (index out of range or something). [code] try { MyFunction(1,2); } catch(char* str) { cout …

Software Development c++
Member Avatar for daviddoria
0
93
Member Avatar for Lukezzz

I am using VC++ 2008 and wonder, that if I have made a project. "Windows Forms Application" that only consist of an Emty Form. I wonder how it is possible to Compile this so this will be an application. I have searched around in the properties and found something called …

Software Development c++ visual-studio
Member Avatar for Lukezzz
0
122
Member Avatar for alivip

How can I get every Token (word) and PreviousToken(Previous word) From text file For example if the text file content is "Every man has a price. Every woman has a price." First Token(word) is "Every" PreviousToken(Previous word) is none(no previos) Second Token(word) is "man" PreviousToken(Previous word) is "Every" Third Token(word) …

Software Development file-system python
Member Avatar for Freaky_Chris
0
244
Member Avatar for MikeyFTW

Ok heres the deal i need to make this program that will allow users to practice their addition and subtraction for whole numbers between 1 and 100, 1 and 200 and 1 and 500 (the levels of difficulty). The user will be allowed to choose which operation to have questions …

Software Development gui mathematics python
Member Avatar for kdoiron
0
123
Member Avatar for hezfast2

I'm writing a program that takes an input string and gets the length and/or gets the number of vowels and consonants in the string. I've gotten it working except for consideration of spaces (which are allowed) and error checking for input other than letters. Here is what I've got so …

Software Development gui java java-swing
Member Avatar for hezfast2
0
111
Member Avatar for blackbeard

I have an assignment to make a text-based snakes and ladders game using Dev-C++. I have so far made a splash screen and a menu (with colours and sounds, pretty cool) using the winmm.a library and the switch/case construct. I have even been able to get player names with a …

Software Development c++
Member Avatar for blackbeard
0
1K
Member Avatar for nnobakht

hey guys, im have written a code that all it does is get user input and run a simple fork task. the problem i am running is the commands i type for example /bin/ls and so on does nothin it jsut asks for the next input. Could someone give me …

Software Development c
Member Avatar for Luckychap
-1
692
Member Avatar for sarabhjeet

HI all, whenever we open any python/wxpython program there is one more window other than our application is running which is command line window that black window for showing any error or any output through print statement.So i want to remove that window from my wxpython's application,how to do this?please …

Software Development python
Member Avatar for sarabhjeet
0
137
Member Avatar for swapna7999

hi there i want my forms do not move is there any property that sets it at a fixed position thank u very much

Software Development visual-basic
Member Avatar for swapna7999
0
76
Member Avatar for hezfast2

Hello all, I'm writing a program that gets an input string entered and I was wondering if there is an exception thrown so that the string is valid only if it is all letters. I can find exceptions thrown for only doubles, int.... as valid input but none for only …

Software Development java
Member Avatar for hezfast2
0
108
Member Avatar for buddha527

I have a programming assignment to write the Knight's Tour. I have completed the code using simple recursive calls, my problem seems to be if the user enters any starting location the program takes longer then 45 minutes to complete and I am not sure if it even completes because …

Software Development c++
Member Avatar for jephthah
0
2K
Member Avatar for Prabakar

I happened to try find the total number of ways a horse can cover all 64 squares in a chess board without visiting a square more than once starting from one corner. All I was able to do was to use a brute force algorithm which run for a whole …

Software Development algorithm c
Member Avatar for Prabakar
0
188
Member Avatar for PersonPerson

Plain and simple. I want to do this: [url]http://www.codeproject.com/KB/dialog/csSlideForm/SlideForm_Main.gif[/url] ...on VB.NET, yet I haven't the least idea about where to start. I've searched plenty without luck. Thanks in advance.

Software Development vb.net
Member Avatar for PersonPerson
0
95

The End.