132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for NitaB

Hey guys! I'm trying to write a recursive function to take a number in binary form and change it to decimal. As of now I am having the dumbest problem. I can't seem to take 2 to a variable power. This is probably something so basic but I'm drawing a …

Software Development c++
Member Avatar for jonsca
0
138
Member Avatar for penguin22

Hi, I keep getting the error Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) when i try to make a guid. [CODE] string entryNum = Convert.toString(entryNo); Guid key = new Guid(entryNum); [/CODE]

Software Development
Member Avatar for penguin22
0
3K
Member Avatar for xofth

I want to get only y and n from user to enter when user try to enter another it get the input again until user enter "y" or "n" i use this logic but its not working [CODE] do { cout<<"\n\n Enter Number: "; number=getche(); cout<<"\n Want to enter another:(y/n)"; …

Software Development c++
Member Avatar for xofth
0
226
Member Avatar for angrycoder

I'm supposed to create a program that takes a input file and goes through it and outputs it into a index file and counts the number of times a word appeared. It is only supposed to do words that are 3 letters or longer and I can't figure out how …

Software Development c++
Member Avatar for Lerner
0
158
Member Avatar for Drunk.scientist

I am getting an Error stating canot convert string to Char type code is as follows [code] /* Jonathan Thomas ITSE 2421 intro to object C++ begin sudo code: function takes in string variable called "verb" function uses string function verb.length to determine length of string assigns value to size …

Software Development c c# c++
Member Avatar for jonsca
0
208
Member Avatar for vmirz

My goal is to implement a sorting into a linked list. I have everything working thus far, but I'm a bit stumped as to how I need to change my insert function in order for an element to be placed in the appropriate location. Here's my code thus far: [CODE] …

Software Development c++ linked-list
Member Avatar for VernonDozier
0
143
Member Avatar for dls_20022002

IS THERE ANYONE OUT THERE THAT KNOWS HOW TO WRITE TO A FILE'S LINE, WITHOUT CHANGING OR DELETING ANY OF THE OTHER LINES FOR EXAMPLE IF A LINE SAYS Status: Show and i want it to change that line to Status: James plz help

Software Development c++
Member Avatar for Lerner
0
82
Member Avatar for Jaxzen

My program is supposed to essentially be something like Wheel of Fortune. As long as the user guesses letters that aren't in the word, the program behaves properly. But, when the user inputs a letter that IS in the word, the program stops and doesn't continue at all. [code] #include …

Software Development c++ perl
Member Avatar for Lerner
0
176
Member Avatar for noahssite

Let's say I have form1 and form2. Form1 and Form2 are open. You click a button on Form2 and it adds 1 to a variable called myNumber on Form1. Now the problem is I can't use the new keyword and create a new instance of Form1, because Form1 declares myNumber …

Software Development
Member Avatar for noahssite
0
108
Member Avatar for Danny_501

Hi all, Im using hibernate in netbeans to map to a mysql database, but am having problems.... when I open a session: [CODE]Session session = SessionFactoryUtil.getInstance().openSession(); session.beginTransaction();[/CODE] it prints out this in the console:... [COLOR="Red"]12/04/2010 9:50:26 AM org.hibernate.cfg.annotations.Version <clinit> INFO: Hibernate Annotations 3.3.1.GA 12/04/2010 9:50:26 AM org.hibernate.cfg.Environment <clinit> INFO: Hibernate …

Software Development java java-netbeans session xml
0
108
Member Avatar for pareshverma91

can any one please give me a link from where i can find out how python executes internally,i mean the way objects are declared, stuff stored etc.

Software Development python
Member Avatar for scru
0
108
Member Avatar for peppermints

[CODE]from Tkinter import * import random weapons = ("rock", "paper", "scissors") class Application(Frame): def __init__(self, master): Frame.__init__(self, master) self.grid() self.create_widgets() def create_widgets(self): Label(self, text = "Choose your weapon!\n" ).grid(row = 0, column = 0, sticky = W) Label(self, text = "Weapons:" ).grid(row = 1, column = 0, sticky = W) …

Software Development gui python tkinter
Member Avatar for jcao219
0
714
Member Avatar for daveoffy

Hello, I have a program where after you login, I need it to re-design the whole window. Is there a way I can change the WndProc to make the code cleaner. Thanks. I have a case for the login if successful, so it will be put in there.

Software Development api c windows-api
Member Avatar for strmstn
0
134
Member Avatar for Swingjohn

I just cannot figure out what is wrong, so tried. Can someone please help me so I can finish this today or tomorrow please. [code] //adds all 10 panels together this.add(mainpanel); //set see the frame setVisible(true); } JOptionPane.showMessageDialog(null,"Oringinal Balance = $" + recieveAmount + "\nPayment#" + x + "\nMonthly Payment$" …

Software Development java
Member Avatar for Swingjohn
0
89
Member Avatar for tphuoc

I have figured out how to populate the comboboxes for an app I'm making from a database this is not the actual code but is basically the way I'm populating them [code] for i = 0 to maxrows - 1 cbobox.items.add(dataset.tables("datatablename").Rows(i).Item(x)) next i [/code] I need either to be able …

Software Development dataset vb.net
Member Avatar for tphuoc
0
98
Member Avatar for LevyDee

Im teaching myself the Win32 API, so im messing around learning functions and what not. So how do I change the text on the button if it is clicked? I cant figure it out. Thanks [code] #include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); const int …

Software Development api c++ windows-api
Member Avatar for LevyDee
0
108
Member Avatar for jgehlot09

I am trying to write an function, which takes an string as input and do something and return the strings. Here Is a small try from my side. [CODE] #include<stdio.h> char algo(char n) { char result[15]; if(n=='1' || n=='2' || n=='3' || n=='4' || n=='5' || n=='6') { result = …

Software Development c
Member Avatar for Adak
0
98
Member Avatar for seacase

I am having trouble adding the ability to order an integer array in both ascending and descending order. I have implemented the functions myself and am having trouble figuring out how to order them in reverse order. I am passing in a boolean variable to test which direction the array …

Software Development java
0
115
Member Avatar for PDB1982

I had my code working properly, but once I added my last array, it goes through the compile and then errors out....and I'm not quite sure why.... [code] #include <iostream> #include <fstream> #include <cstdlib> #include <cmath> using namespace std; int main() { double num[100], sum, count, newnum[100]; int j,i; ifstream …

Software Development c++
Member Avatar for PDB1982
0
83
Member Avatar for nats01282

Hi all im after a piece of code that allows the user to enter a fraction e.g 1/4 and have the code split that fraction into 2 seperate variables, e.g variable 1 containing the '1' variable 2 cantaining the '4' How would i achive this? My objective is to make …

Software Development c++
Member Avatar for nats01282
0
171
Member Avatar for soroush68

There's a simple question? how to print the size of a variable without using functions like sizeof() ? for example if you were asked to write a program that prints size of int without using sizeof() with a resault as below: cout<<sizeof(int);

Software Development c++
Member Avatar for bharath404
0
257
Member Avatar for mincus

Hi i have been trying to get a GUI in BlueJ working properly but i hav come across a prolem, i hav 2 buttons which i want to use but when i click them the actionListener wont run my methods. In the action preformed bit i tried to make it …

Software Development gui java java-swing storage
Member Avatar for llemes4011
0
143
Member Avatar for sdgz747

I am trying to read a file into an array and set the min and max values. At this point in my program, I am trying to just read it into an array and then display that array. I still have more to do in the program, but I am …

Software Development c++ file-system
Member Avatar for WaltP
0
112
Member Avatar for pateldeep454

My main.java [CODE] public static void main(String[] args) { // TODO code application logic here Rational x = new Rational (); x.num = 2.0; x.den = 3.0; System.out.println (x); Rational.negate (x); Rational y = new Rational (1.0, 3.0); System.out.println (Rational.invert (y)); } [/CODE] My rational.java [CODE] package rational; public class …

Software Development java
Member Avatar for harry010
0
646
Member Avatar for corby

Ok so this is my code below in my member function definition .cpp file. The problem is when I execute the program it will not let me fill the answer for the first question so for example the output is: Please enter the name of the receiver: Please enter the …

Software Development c++
Member Avatar for corby
0
108
Member Avatar for Enders_Game

***Editted: added second problem I have this code, how do I make it stop once it's found the first instance of the [B]if[/B] happening. break, myparser.close(), and return don't work. [CODE]from html.parser import HTMLParser class MyHTMLParser(HTMLParser): def handle_starttag(self, tag, attrs): if tag == 'a' and (attrs[0][1].find('downloads&showfile') != -1): print(attrs[0][1]) print(attrs[1][1]) …

Software Development html-css python
Member Avatar for Enders_Game
0
170
Member Avatar for lewashby

In the code below I can't understand the line [COLOR="Red"]List<Surface> sfcStars = new List<Surface>();[/COLOR] What's going on here, and what are "<>" those doing in the code, I've never seen the before. I got this code from [url]http://www.tuxradar.com/beginnerscode[/url] [CODE]using System; using SdlDotNet.Graphics; using System.Collections.Generic; using System.Drawing; namespace TroutWars { class …

Software Development
Member Avatar for apegram
0
122
Member Avatar for gregarion

Hey guys for my assignment i have to write a program which checks the information inside a text file to make sure it is all integers and then convert the integers to roman Numerals. My program seems to have a bit of a problem and im not sure where exactly …

Software Development c++
Member Avatar for r.stiltskin
0
279
Member Avatar for bohongtw

Hi there, i m working on dining philosopher problem , i wrote some codes but i keeps giving some error like : "/tmp/ccMEjOtr.o: In function `philosopherRun': betterDiningPhilosophers.c:(.text+0x7a): undefined reference to `pthread_mutex_trylock' /tmp/ccMEjOtr.o: In function `main': betterDiningPhilosophers.c:(.text+0x54d): undefined reference to `pthread_create' collect2: ld returned 1 exit status " even i try …

Software Development c
Member Avatar for jephthah
0
220
Member Avatar for Q8iEnG

Hi mates :) recently I did this code: [CODE]#include <iostream> #include <windows.h> #include <string> using namespace std; int main() { int check = 1; string dir; string dir2; string name; cout << "Which directory is the file located?\n"; getline(cin, dir); cout << "\nWhere you wanna move it to which directory?\n"; …

Software Development c++
Member Avatar for WaltP
0
164
Member Avatar for mauryoung

ok i have this project that i have been working on to fin harmonic,powerful,amicable and perfect numbers i have a few but im at a road block right now and would love some assisstance. [B]POWERFUL NUMBERS[/B] [CODE]#include <iostream> using namespace std; int main() { int endRange = 500, var1, var2, …

Software Development c os-x
Member Avatar for WaltP
0
229
Member Avatar for ssDimensionss

hey guys, as well all know, C rounds downwards, anyway, i'm trying to write a function that would make it round upwards, and got something like this: [code=c] int round_up(float x) { int y = 100*x; double z = 100*x-y; if(z>0) y = (x+0.01)*100; else y = x*100; return y; …

Software Development c
Member Avatar for 0x69
0
6K
Member Avatar for mithunp

Trying to write strcat function, kindly review the code and post the comments.[code]char* mystrcat(char* dest,const char* src) { char* ptr; ptr = dest; while(*dest++ != NULL); dest--; while(*dest++ = *src++); return ptr; }[/code]

Software Development c++
Member Avatar for Ancient Dragon
0
103
Member Avatar for KSUliz

[code=java] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.util.*; public class Transfer extends JFrame implements ActionListener { //Declare output stream DataOutputStream output; //Construct a panel for the fields and buttons JPanel fieldPanel = new JPanel(); JPanel buttonPanel = new JPanel(); //Construct labels and text boxes JLabel …

Software Development file-stream java java-swing
Member Avatar for KSUliz
0
136
Member Avatar for bunnyboy

So for example, I have an array like that: [CODE=C#]char[] pattern = "GCAGAGAG".ToCharArray();[/CODE] And what I would like to do is to extract out distinct values and its corresponding indexes(smallest one) from right to left where first letters does not count. example: reversed array: [COLOR="Green"]GAGAGACG[/COLOR] Distinct values are: [COLOR="Red"]A, C, …

Software Development
Member Avatar for bunnyboy
0
102
Member Avatar for sandorlev

hello! i've just tried out lists in c++, but they're giving me some kind of problem. it has something to do with iterators but i'm pretty sure i'm using them the right way. anyway, here is the code: [CODE] #include <list> #include <iostream> int main(int argc, char* argv[]) { std::list<int* …

Software Development c++ seo
Member Avatar for sandorlev
0
156
Member Avatar for vbx_wx

[CODE] HKEY hkey; DWORD nSubKeys = 0; TCHAR name[MAX_PATH]; DWORD size = sizeof(name); FILETIME filetime; if(RegOpenKeyEx(HKEY_CURRENT_USER , "Software" , 0 , KEY_QUERY_VALUE , &hkey) == ERROR_SUCCESS) { if(RegQueryInfoKey(hkey , 0 , 0 , 0 , &nSubKeys , 0 , 0 , 0 , 0 , 0 , 0 , &filetime) …

Software Development c++
Member Avatar for vbx_wx
0
124
Member Avatar for Diomedes

Hello Python forums, I started working with Python recently and picked up a book. The book stated discussing using the ctypes module in python which is slick because it's exactly what I need to be learning. I started trying to test my knowledge by implementing a simple, singly linked list …

Software Development linked-list python
Member Avatar for TrustyTony
0
705
Member Avatar for biomed

I have files that contain lists of lists. Each file has about 20.000 lists that each list member is a list of itself with 15 values. Think of it as a database table. I know we can use a binary search to find a member of a list but can …

Software Development python
Member Avatar for sneekula
0
138
Member Avatar for geoNeo_

Hello all I hope someone could help me, i have a small application that I wrote for a friend, but I need it to start up every 24 hours or so. It basically like a reminder application but i need it to start up at a predefined time. I have …

Software Development
Member Avatar for geoNeo_
0
227
Member Avatar for smitysmit

at the moment i have 2 answers to queations and the answers are 1,2,3 or 4 but i ow have to make it so the user has to put a work in like "Brazil" but i try to do the same as if the user puts "A" in and it …

Software Development c c# c++
Member Avatar for Robert1995
0
148
Member Avatar for Covert06

I know I'm going to be bashed at for this, just please read at least this much before you start yelling at me to read the faq or thousands of other posts online. Im having a problem clear screening for my school work since my teacher has a fetish for …

Software Development c++
Member Avatar for Covert06
0
195
Member Avatar for dipankar_pr

Hi,All, I am try to develop a project where the back en database is MS access, front end is vb6 and connectivity establish by odbc. the database content multiple table. Frost table [COLOR="Green"]student[/COLOR] contain [COLOR="green"]roll, name[/COLOR] second table [COLOR="green"]marks[/COLOR] contain [COLOR="green"]roll, math, English[/COLOR] there is four text box namely txtRoll, …

Software Development microsoft-access visual-basic
Member Avatar for dipankar_pr
0
1K
Member Avatar for mitch9654

Hello, I am trying to make a calculator that does multiplication, division, addition and subtraction. My problem is that when I have the two numbers that have decimals it goes wonky. Anyway, that program runs like this: 1. User enters equation 2. Unwanted characters get thrown out 3. If operation …

Software Development c++
Member Avatar for chary8088
0
248
Member Avatar for artikapri

Any forward error correction (FEC) implementation in C++? i need it for my project. i converted character into ascii value then converting them into binary values.now i need to append error correcting bits. i m doing my project in vc++. following is part of my code: [CODE]array< array< int >^ …

Software Development c++
Member Avatar for vijayan121
0
129
Member Avatar for avinash_545

hi everyone, I am currently working on a small college project and I was wondering if it was possible to insert MS Paint in one of my form. If such a method exist, I would be really grateful if you can give me the code as well... ..............(the fact is …

Software Development api vb.net
Member Avatar for avinash_545
0
117
Member Avatar for method4ever

[code=c] #include<iostream> #include <string> #include <sstream> using namespace std; int main(){ int i=0, ii = 0, x; string input; //command to prompt user for amount of movies cout<< "How many movies do you want to add? "; getline(cin,input); //end command to prompt user for amount of movies //set up loop …

Software Development c++
Member Avatar for method4ever
0
190
Member Avatar for Mme

I'm working with a HCS12 Motorola chip trying to make a MIDI player. Got stuck on the function of play/pause/forward/back. These are controlled by external switches set to high and low. Below is my attempted switch settings: [CODE]switches LDD $0000 CPD #$0001;"pause" button BNE AFTER_1 PAUSED LDD $0000 CPD #$0002; …

Software Development assembly
Member Avatar for Salem
0
147
Member Avatar for Dio1080

Binary Search tree help Can somebody explain to me what this code is doing step by step?, thanks [CODE=Java] TREE-SUCCESSOR(x) 1 if right[x] ≠ NIL 2 then return TREE-MINIMUM (right[x]) 3 y ← p[x] 4 while y ≠ NIL and x = right[y] 5 do x ← y 6 y …

Software Development c++
Member Avatar for mailmarwa
0
260
Member Avatar for angel19

hi, can anyone help me with my code, any help will be much appreciated. The design should follow object oriented principles and use the UML tools. It should be a board game based on a “Monopoly-style” board made of 36 squares. The game is for two players who first enter …

Software Development c++ user-interface
Member Avatar for mn.balakumar
0
3K

The End.