132,726 Archived Topics
Remove Filter ![]() | |
Hi, Can any one please describe that if we can use || and && operator in C++ as following ? [code] if (choice == 'e' || 'E' && cur == 'd' || 'D' ) { cout << " Enter amount in Euro " ; cin >> amount ; } [/code] Software Development c++ | |
[U][B]Explanation on why program must maintain simplicity:[/B][/U]I am a peer tutor of a computer programming class and my teacher has asked me to develop a few simple games to teach the class. This is the first year the school has taught Python (thanks to my final project last semester, and … Software Development peer-to-peer python tkinter | |
I need to write a program, which shows the different combinations in which matrices can be multiplied. The output should look like below : When there are two matrices multiplied there is one combination (XX) When there are three matrices multiplied there are two combinations (X(XX)) ((XX)X) When there are … Software Development java matrix-multiplication | |
Alright, so it has become apparent to me that Microsoft has switched up the Win32 API in Visual Studio 2010 (I'm not too experienced in the API already, I was just starting to get the hang of it). Does anyone know what exactly they changed and where a good tutorial … Software Development api c++ visual-studio | |
Hey guys, I am working on this encryption/decryption project and I have just finished writing the encryption part of the code. I complied it and ran it. The first part worked well. However once I chose to encrypt a file ( I didnt choose decrypt because it was not completed), … Software Development c++ encryption | |
Hi, Who can anyone give me the simplest method for encryption and decryption for text file? I saw a lot of methods in other website. So, I choose the simplest one, but it gives me some errors when I do it. This is the reference link. [url]http://www.vb6.us/tutorials/basic-encryption-xor-tutorial[/url] [CODE]Dim strResult As … Software Development encryption visual-basic | |
I am writing a rational number class and need to know if this is the correct way to do it. Can someone please let me know if I'm on track or not? Thanks. [CODE]class RationalNumber { public: RationalNumber( int = 0, int = 1); // constructor RationalNumber operator+( const RationalNumber& … Software Development c++ | |
Hello, i am currently writing an assembler for the theoretical SIC/xe machine and i decided to do it in python. Very new to python but i thought it would be fund to do it in and willing to learn. So far i know what to do and have the diea … Software Development open-source python | |
I need help to create a search button vb.net to search a access database that is binded in vb.net. I want to search for 2 items in the database and display then in the datagrid. the code i done is here. [CODE] Dim da = New OleDb.OleDbDataAdapter() Dim con As … Software Development dataset microsoft-access open-source vb.net | |
I have one problem when passing value to parameters for Crystal Report Viewer. The parameters are from Stored Procedure which I have defined. My aim is to accept values from user and display it accordingly. I try to write code as below in Button View Click Event: [code=language] Dim rptdoc … Software Development vb.net | |
why is my code not letting me repeat? after the first run, and you type y to repeat it skips the run and say repeat again? [[CODE]void line(){ char ans; do{ string line; int count=0; cout<<"Enter a line of text.\n"; getline(cin,line); for(int x=0;x<line.length();x++){ if(islower(line[x])&&isalpha(line[x+1])&&isalpha(line[x+2]) &&isalpha(line[x+3])&&(!(isalpha(line[x-1])))&&(line[x+4]==' '|| line[x+4]=='.'||line[x+4]==','||line[x+4]=='\0')){ count+=5; } else{ … Software Development c++ | |
So this is assignment number 14 and this is the fourth time Im bothering you...I hope you can help me. I think Im almost done with it but I can not get "toupper" my name and lastname so it would be copied to the outfile.txt file. Description: The program writes … Software Development c++ file-stream | |
Hello. Finishing up the my program that's due soon and I've came across some hiccups you could say. Basically I am to write a Class definition file and use it to to read in an infinite amount of fraction problems. (+,-,*,/,<,>,<=,>=,==, and !=) While I have successfully written most of … Software Development c++ | |
Hey, netbeans is giving me gray hairs with the localization wizard. First up, how can I completely remove a localization or resource bundle, now when I delete the file in the projec tree, it pops up right back up when I write the names of the components again. Second why … Software Development java java-netbeans | |
Hi, I'm new to C++ and my first assignment is to convert C code into C++ code. Here I have a loop, however; I can't seem to get it to break out of the loop. It is suppose to input an odd number that is less than 15 and set … Software Development c++ | |
[code] import sys import random sys.setrecursionlimit(1500) def prime(n): """ Generate all prime numbers less than n. """ yield 2 primes = [] for m in range(3,n,2): if all(m%p for p in primes): primes.append(m) yield m n=int(raw_input()) i=0 j=0 while(n!=-1): p=list(prime(n)) sun=0 while(sun!=n and i<1000000000000000000000000000000): F=random.sample(p,4) sun=sum(F) i+=1 if(sun==n): for i … Software Development python | |
![]() | I am writing a code to open a command line, prompt for the name of a file to copy, prompt for a new file name, then it should copy the file (adding a header and line numbers plus adding .lis to the filename of the new file). I BELIEVE I … Software Development c file-system ![]() |
Hi i am new in python,i have just got a question below A friend of yours has just bought a new computer. Until now, the most powerful computer he had ever used was a pocket calculator. Now, looking at his new computer, he is a bit disappointed, because he liked … Software Development python | |
Dear All, I would like to change the content pane of frame after pressing a button by the method: frame.setContentFrame(newContentFrame); However, after press the button, the Frame is frozen~~ How can I make it work? THANKS A LOT~~ [CODE]import javax.swing.*; import java.awt.event.*; public class Test{ JFrame main; JPanel panel1; JPanel … Software Development gui java java-swing | |
I have some code that implements a linked list. The program has the basic implmenetation including: • IntList() // Constructor • ~IntList(); // Destructor • void appendNode(int); • void insertNode(int); • void deleteNode(int); • void displayList(); • void reverseList(); I am trying to get the reverList to work correctly. Below … Software Development c++ linked-list | |
hi, i work on windows application and i want to know how to use the components (textboxes,..) of a winform in another winform. thanks Software Development | |
how would i be able to seperate the text inside a file into the lines they are in? eg: [code] char *lines; lines = seperate_into_lines(a_file); /* not a function */ [/code] Software Development c | |
I have recently been given quite a complex piece of work to do by my computer science supervisor. The idea is that the function:- [def shape_resistivity(shape,R):] allows the user to input a shape and resistance value like so: [CODE] [shape=[\ ' ', '++++', 'xxxx', 'xxxx', 'xxxx', '----', ' '] [/CODE] … Software Development python | |
Alrighty, just wondering if anyone can spare a few minutes to help me out a little. Trying to do the finishing touches on a project I've got for tomorrow. My problem is this - I'm trying to make the user interface a little more appealing instead of it just asking … Software Development c++ user-interface | |
hi all just i wanna know how can i use condition with message box i used the statment: [code] MessageBox.Show("Are you Sure?","collection", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if(DialogResult.Yes=) ; { this.Hide(); MessageBox.Show(M, "collection", MessageBoxButtons.OK); } [/code] but its dont work can any one hel plz im so beginner at c#....... *how i can … Software Development | |
What is wron with my code?: [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int i; void myfunc(char scrpt); char scrpt; char scpt[10][200]; int junk; int main() { int z; char scpt[10][200] = { "AAA", "A1", "BBB", "B1", "CCC", "C1", "DDD", "D1", "EEE", "E1" }; srand((unsigned)time(NULL)); z = rand()%1-10; … Software Development c++ visual-studio | |
Howdy! I'm trying to get my head around some simple pattern matching or regular expressions using python. Basically I want to be able to match "Failed 0.00/100.00", where 0.00 could be any decimal number. I know using perl it would be something along the lines of "\d+\.\d+\/100\.0", but could anybody … | |
I need help with inputing the file. The file has the "lastName" "firstName" "phoneNumber" "email" then a new line. When i read in all 4 rows it says the first line in all 4 rows. the infile is in main [CODE]#include <iostream> #include <fstream> using namespace std; void mainMenu(); void … Software Development c++ microsoft-office | |
I am trying to migrate from VC++6 to VC++9. I am getting error " fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory" on build. I tried removing .h and adding using namespace std; after #include, here it gives me error in iosfwd file like "iosfwd(574) … Software Development c++ | |
Sorry for the newbie question, but I'm just starting out with XML and XSLT. Here's the question. I'm working on an XML transcription of a document that includes corrections written in the margins and using XSLT to display it in HTML. Here's the tag I was told to use. [code]<app><rdg … Software Development xml | |
I have a c++ problem regarding looping. I am writing a program which will include a problem similar to below. 1) ok, i am writing a program that asks the user to enter a number. 2) Then ask the user if the number entered was correct. 3) If the number … Software Development c++ | |
I have been asked to write a public method called Caught() which takes a single argument of type LittleAlien and returns no result, for the AlienGame class. The method should check whether the argument occupies a stone corresponding to the stone occupied by the BigAlien. If so, the health of … Software Development java | |
Hey guys and gals, I just wrapped up my first year of University CS and I feel like tackling my first personal project. My program will need to read in the mp3 title, artist, and album of many mp3 tags. My problem is that in class I only dealt with … Software Development c | |
So I'm trying to get it to update the score by 30 each time a fly is hit. I've tried this a number of ways, but none of them seem to be working. Here is my code (I've commented out some unneeded things so I didn't have to upload so … Software Development python | |
I have an if stmt which checks to see if a char value (upper or Lower) is equal to a value input by end user. My understanding was if you are using a char value in a conditional stmt you need to put single quotes around the char value. If … | |
Hi, I've only learned c++ for about 2months, I've basically learned up to arrays, two and multiple dimensions but not in-depth. Currently reading through pointers. I've managed to achieve a similar graph to what i am supposed to have. What I'm getting. [IMG]http://i109.photobucket.com/albums/n79/johnz13/graph1.jpg[/IMG] Should look like. [IMG]http://i109.photobucket.com/albums/n79/johnz13/graph.jpg[/IMG] Problem I am … Software Development c++ | |
I´m sorry if I haven´t investigated enough but I´m not quite an expert in hibernate and I´m tired of looking for something that won´t really solve my specific problem. What I mean is that I am a bit short of time. I have a User class that represents every single … Software Development java | |
he below code works fine with dec c++ compiler but when run on visual studio gives the error at fseek[code]#include<stdlib.h> #include<stdio.h> #include<conio.h> int main() { FILE *fp; char *stringBuff; int i; int epi = 0; long lSize; fopen_s (&fp, "sequence.txt" , "rb" ); fseek (fp ,0 , SEEK_SET); lSize = … Software Development c visual-studio | |
Hi all, I create a MFC DLL "Static" and with wizard I add a dialog and "Microsoft web browser" ActiveX in this dialog, also I create a class for this Dialog. All I want here to call this Dll from a Win32 app "normal c++" and load this Dialog into … Software Development c++ web-browser | |
I've come across two questions from my previous years college test papers. I just couldn't solve them [LIST=1] [*][I]Define rational number as an ADT (abstract data structure)[/I] [*][I]Write a suitable C code to sort a finite set of elements where an element may appear a large number of times[/I] [/LIST] … Software Development c data-structure | |
Haha, still not getting the hang of this, I am afraid. I have written a script: [CODE]#!/usr/bin/env python print ("Hello, world!") name = input("What is your name? ") print ("Hello, " + name + "!")[/CODE] I have saved it as hello.py. And I try to make it executable in terminal: … Software Development python | |
Looks like I can't stop having problems with SQL haha I'm trying to delete a value from a database using the following code, and I have no idea where it's going wrong. It gives the messageboxes saying the operation goes through ok, but doesn't actually delete the data. Here's my … | |
Hi, I wanted help implementing how to count vowels and preposition in a text file..this is what i have for counting words, the other are blank because i simply can't get it to work..Help is greatly welcomed.. [CODE]import java.io.*; public class FileIO { public static void main(String[] args) throws IOException … Software Development java | |
I need to write a program that sums all values in an array row that the user can choose. The program sums correctly but instead of only outputting one row's sum, it sums up all of the rows up until the input row and adds them all together. I can't … Software Development c++ | |
hi there, in my project i have a combo box with some values in it at runtime the user can write on that combo box,ho do i avoid this and let the user select only a value from the combo box. can some one help me with this, thanx Software Development | |
I have worked on this code hours, and get it to work finally on Linux Debian.. its basically sort a linked list --bubble sort. Also I added a piece of code to the main function to measure the execution time of the bubble sort function what I am trying now … Software Development c++ debian linked-list | |
Hi, I had a query whether Windows multithreading API throw any Synchronization exception. If I am sharing a STL string between threads and the string is not guarded,will there be any synchronization exception. Another query is does STL container throw exceptions apart from memory violation Thanks in advance :-) Software Development api c++ multithreading windows-api | |
I'm an experienced programmer of 5 years in Java & C#, but recently I decided to program in C++ as well. I'm familiar with proper code syntax and advanced programming techniques, but this compiler error i'm getting just stumps me beyond recognition, I've analyzed my code for syntax errors a … Software Development c++ | |
hey plz can anyone do this for me Task-1: 1. Write a C code that takes a file as input. Say input.txt which has the information about the object to be transformed, type of transformation, etc. 2. Input file can have following different formats. Case 1: P # first line … Software Development c | |
I've just write a very simple console application in Visual C# stdudio 2008 and got a message. But I really don't understand what the hell is that? So please let me know what is that and how to solve that problem. Thanks in advanced. Software Development c# |
The End.