43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for lewashby

I'M trying to compile a very small cout<< console application in MSC C++ but the program flashes up and goes away so quick that I can't see anything that's going on. Below are my headings, what's missing? Thanks. #include <Stdafx.h> #include <iostream> using namespace std;

Software Development c++
Member Avatar for Nick Evan
0
248
Member Avatar for prem2

Hi , I have implemented the Hashtable and enumeration concepts in java.The program is executed fine but i have a doubt.When i try to print the keys and elements in the Hashtable by using enumeration ,it start prints from the second key and second element. Did any one know why …

Software Development java
Member Avatar for JamesCherrill
0
173
Member Avatar for MasterHacker110

I am wondering that if you can make a C# program that is like C++. My meaning with that is that it doesnt require a "Runtime" to work. I ask this becuase i want to write a operating system completely in C# (yes with very few assembly involved).

Software Development assembly c# operating-system
Member Avatar for Godfear1
0
203
Member Avatar for iismitch55

I have been researching ways to make a DOS window disappear when starting a program. I have solved this, by using getconsolewindow() and setwindow(). The thing is, I still get a blip where the DOS appears for a couple miliseconds. Is there a way to fix that? Clip of code: …

Software Development c++
Member Avatar for iismitch55
0
930
Member Avatar for klevasseur

I have some text files (actually csv) that have the extension .ROS stored on a server and I can't seem to open them in Python. If I change the extension to .txt or .csv, I can open them fine either as text or csv, but I'd rather keep the .ROS …

Software Development python
Member Avatar for vegaseat
0
136
Member Avatar for rahim_fayaz

Hi I am getting this error when running a very similar code like the below. I have memory problem,but i dont know how can solve it. please help. Thanks in advance. /////////////////////////////////////////// ~~~~~~~ERROR~~~~~~~~ terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted /////////////////////////////////////////// ~~~~~~~~Code~~~~~~~~~ int main(){ /** Declare …

Software Development c++ motherboards-cpu-ram
Member Avatar for rahim_fayaz
0
141
Member Avatar for abulut

Hİ; I want you guys to prepare a script. I will attach output.txt file. ıt should check BSC and BCF name which are in INPUT.txt and SITE.txt. After comparing , ıt should come out a SITE column in the OUTPUT.txt and there will be site names under of that column. …

Software Development perl
Member Avatar for abulut
0
133
Member Avatar for programing

here code for make new file .. how i can make it to insert data to file and open it /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package files; import java.io.*; import java.util.Scanner; public class Files{ public static …

Software Development file-system java
Member Avatar for NormR1
0
792
Member Avatar for GeekTool

import java.util.Scanner; public class Interest { public void determineInterest(){ Scanner input = new Scanner(System.in); double amount; double rate1 = 0.05; double rate2 = 0.06; double rate3 = 0.07; double rate4 = 0.08; double year; double principal = 1000; System.out.println("Please choose your bank below:\na)Ziraat Bankasi\nb)Halk Bankasi\nc)Is bankasi\nd)City Bank"); String bankname = …

Software Development java
Member Avatar for NormR1
0
264
Member Avatar for Despairy

I have read a file with around 120k words so i try to do it fast. have seen the: int x = setvbuf(fp, (char *)NULL, _IOFBF, BSZ); assert( x == 0 && fp != NULL ); option but it takes more than a second ( 1 mb file) so now …

Software Development c c# c++ file-system
Member Avatar for Despairy
0
296
Member Avatar for drichird

In Python: #python class myClass: istat = 111 #exists as soon as import class def __init__(self): print("in ctor") self.iauto = 222 #does not exist until instance created ..... mc1 = myClass() mc2 = myClass() In C++: //C++ class myClass { public: static int istat; int iauto; }; ..... //main myClass …

Software Development c++ python
Member Avatar for Gribouillis
0
808
Member Avatar for Farhad.idrees

i have this code...i m retreiveing did from selected name........ i want to assign this to varible because i want to use this variable to another place... i hope i will get help here.. [code] MyDataAdapter = new SqlDataAdapter("select D_Id from tblDepart where D_Name = '" + D_Name + "'", …

Software Development dataset
Member Avatar for vpsingh136
0
172
Member Avatar for ilovejava

i have to do a pyramid with a pattern like this [iCODE] 1 1 2 1 1 2 4 2 1 1 2 4 16 4 2 1[/iCODE] i just realized dani web didnt take my center pyrmaid thing it moved to the side no matter what spacing i did …

Software Development java programming-construct
Member Avatar for JamesCherrill
0
323
Member Avatar for khuzdaar

I am familiar with loops, functions, recursions, (though I have praticed some questions, it is troubling to get the hang of it completely), passing by value, reference and ofcourse pointers. I can work with arrays and 2d arrays. This is my second project. My first project was hangman. My sir …

Software Development c++
Member Avatar for khuzdaar
0
517
Member Avatar for Mike Bishop

I have a string 17:55:88 I want to split this up into the three sections and store them in varibles. IE I would like to have the 88 stored in a varible the 55 in a varible and the 17 in a varible. the following code does what i want, …

Software Development vb.net
Member Avatar for Reverend Jim
0
128
Member Avatar for triumphost

I want to start developing an IDE or at least a Syntax highlighter into my program. Atm it's a simple text editor with basic copy paste functions. How does Notepad++ do it? Is there a way I can integrate that into my own program? If not then I'll write it …

Software Development c++ ide
Member Avatar for mike_2000_17
0
1K
Member Avatar for erezz

Hi, I have four files named: AS1.txt AS2.txt AS3.txt AS4.txt The files contain the following text: Example: AS_CLI/ASDiagnostic/Diag> 7 phone 0773008619 AS_CLI/ASDiagnostic/Diag> 7 phone 033008775 AS_CLI/ASDiagnostic/Diag> 7 phone 087300936 AS_CLI/ASDiagnostic/Diag> 7 phone 0773009111 AS_CLI/ASDiagnostic/Diag> 7 phone 0773009701 Status = FAILED AS_CLI/ASDiagnostic/Diag> 7 phone 0773011572 AS_CLI/ASDiagnostic/Diag> 7 phone 0773012844 AS_CLI/ASDiagnostic/Diag> 7 …

Software Development perl
Member Avatar for erezz
0
213
Member Avatar for aot

As a psychologist, it's useful to be able to time people's reactions in milliseconds. What kind of accuracy could I expect to get in this regard from Python? From what I've read so far, it doesn't look like I can hope to get precise enough timing to get reliable results, …

Software Development python
Member Avatar for BBTK
0
9K
Member Avatar for Labdabeta

I used to use a tutorial for windows console API, but the website was taken down :(. So now I need to ask how to do these things (which ALL were included on the website) in the console with windows API: * Mouse events (clicks and unclicks) * Cursor seeking …

Software Development api c++ microsoft windows-api
Member Avatar for Labdabeta
0
200
Member Avatar for evvo69

hi, i am a complete newbie on software development onlt a couple of weeks, currently working through a manual and one of the chapter challenges is to create a number guess game in a GUI enviroment. been trying to look for tips on the web to no avail. i am …

Software Development gui python tkinter
Member Avatar for evvo69
0
2K
Member Avatar for lewashby

I just downloaded netbeans and when I went to start a C++ project I was told that Netbeans couldn't find a C++ compiler. When I use to play around witt MS Visual C++ I never ran into a problem like this, Can anyone tell me what's up and what I …

Software Development c++
Member Avatar for lewashby
0
153
Member Avatar for sesan2007

please am new into programming and i was given a project to create a premier league table using C can any 1 help me thanks a lot

Software Development c++
Member Avatar for nitinmbhanu
0
214
Member Avatar for NPDA

I'm developing wp7 app . i have a problem with this cod i want to get values of table from a webservice and show it in msg box the problem is i have two tables in a web service but in foreach only the first value can shown in two …

Software Development smartphone
Member Avatar for NPDA
0
179
Member Avatar for apanimesh061

public static void main(String[] args) { Set<Point> points = new HashSet<Point>(); points.add(); --- how to add point of "Point" type cureAlgor(0.01, 3,points); } Point is a pre-defined class. I want to know what to wrtie in points.add(). Please help!

Software Development java
Member Avatar for NormR1
0
113
Member Avatar for Valiantangel

Hi my codes works fine.When i key in ,for example, asdf 546,(f and 5 is separated by space), the programe rightly take it as invalid input ,however it takes asdf and 546 as separate type and return two "Invalid input".See below. I hav no clue why it does that oher …

Software Development java
Member Avatar for Valiantangel
0
129
Member Avatar for BryantFury

Hi ive made a code does the following: 1. user makes a list of items 2. user adds more items to the list 3. list is displayed it uses Linked-Lists. here is the code #include <iostream> using namespace std; struct vote { char product[10]; vote *votePtr; }; void addNodes(vote *&startPtr,vote …

Software Development c++ linked-list
Member Avatar for BryantFury
0
252
Member Avatar for Labdabeta

I have a C++ console project in Code::Blocks and I have set breakpoints to test an error. I have set the build for the project to produce debugging symbols for the debug build. I built it, then when I hit debug it just ignored my breakpoints and skipped to the …

Software Development c++
Member Avatar for Goemon
0
9K
Member Avatar for Valiantangel

Hi i came up with the following code for my Assignment.It works.What i dont understand was the following code, the rest of the code i did myself. if ( value == 1 ) smallest = randomNum; Why do i need to assign value to 1? Rest of my codes System.out.println("How …

Software Development java
Member Avatar for Valiantangel
0
88
Member Avatar for nitinmbhanu

//PROGRAM TO FIND DERIVATIVE(FIRST AND SECOND)OF POLYNOMIAL FUNCTIONS #include<iostream.h> #include<conio.h> void main() { int i,d,coeff[100],degree[100]; clrscr(); cout<<"\nEnter the degree of the polynomial : "; cin>>d; for(i=d;i>=0;i--) { if(i>1) { degree[i]=i; cout<<"\nEnter the coefficient of x^"<<degree[i]<<" (with sign) : "; cin>>coeff[i]; } else if(i==1) { degree[i]=i; cout<<"\nEnter the coefficient of x …

Software Development c++
Member Avatar for mike_2000_17
0
1K
Member Avatar for prnjn

Hi. Sorry for this kind of post in this forum.. But i am in serious trouble and need help. My 6th semester of B.E (computer science) will end on 28th-may-2012 (final exams going on now ) And after that i need to do a major training of 45 days . …

Software Development java
0
76
Member Avatar for Valiantangel

I hav this code here that prompt me for only 1 randomNum.I know i need a second loop.how can i go about doing it public static void main(String[] args) { int ii=0; int value; int randomNum; System.out.println("How many integers shall we compare? (Enter a positive integer):"); ii = input.nextInt(); randomNum …

Software Development java
Member Avatar for prnjn
0
129
Member Avatar for rahulraj9

matrix operation please help me coding this in c++: - Inverse matrices. - Calculate matrix determinant. - Set a row or a column of the matrix to a certain value. - Calculate performance (time and memory taken by each algorithm).

Software Development algorithm c++
Member Avatar for nitinmbhanu
0
156
Member Avatar for BryantFury

hi im currently learning about linked list. Ive created a code which is supposed to let you type some numbers, then display them. i did this mostly by using information on the internet(code examples) and such. Hence there are obvious mistakes a bits i do not understand. Here is my …

Software Development c++ display linked-list
Member Avatar for BryantFury
0
171
Member Avatar for idislikemacs

I need a timer that shows the total elapsed time it took for the user to complete the game. I'm running Python 3.2, pyscripter 2.5.3. I'm using "timer.timer" but I'm having trouble. I want the timer to reset when the user inputs "reset", but still keep a running total in …

Software Development python
Member Avatar for memomk
0
147
Member Avatar for wlalth

Hi, how can i return arguments in my custom native dll like ReadProcessMemory api? For example for readprocessmemory, byte arguments return readed value. Its mixed c# and c++ so if its wrong place to ask, sorry about that. public byte[] ByteOku(uint BellekAdresi, int PID) { IntPtr readHandle = NativeMethods.OpenProcess(0x10, false, …

Software Development api
Member Avatar for Momerath
0
469
Member Avatar for AlvinLiu

#include <string> #include <cstdlib> typedef enum {Dominion, Sobeys, Shoppers, Walmart} Store; using namespace std; class Item { private: // name of the item (non-empty string) string name; // number of dollars in price of item int dollars; // number of cents in price of item int cents; // store where …

Software Development c++
Member Avatar for AlvinLiu
0
504
Member Avatar for nitinmbhanu

//TO FIND INVERSE OF A MATRIX #include<iostream.h> #include<conio.h> #include<math.h> #include<graphics.h> #include<iomanip.h> float A[3][3],B[3][3]; int i,j,k,l,m,n,e,f,g,h; float det=0; void main() { clrscr(); cout<<"Enter the 3x3 matrix :\n";//Enters the matrix for(i=0;i<3;i++) for(j=0;j<3;j++) cin>>A[i][j]; //To find cofactor and determinant for(i=0,k=1,m=2,e=-1,g=2;i<3;i++,e++,g--,k-=g,m-=e) { for(j=0,l=1,n=2,f=-1,h=2;j<3;j++,f++,h--,l-=h,n-=f) { B[i][j]=pow(-1,(i+j))*((A[k][l]*A[m][n])-(A[m][l]*A[k][n])); if(i==0) { det+=A[i][j]*B[i][j]; } } } cout<<"The determinant of …

Software Development c++
Member Avatar for nitinmbhanu
0
2K
Member Avatar for kiail

I have a half built invoice, but I'm needing to add items in a list to get a subtotal and total. How should I go about doing that? `using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace FinalProject { [Serializable] public class Invoice { List<int> price = new List<int>(); public …

Software Development
Member Avatar for kiail
0
97
Member Avatar for kiyu2keith

Hi, I am hoping you guys could help me with this. I am trying to loop number into something like this. 0 12 345 6789 here is my code: Dim i As Integer Dim j As Integer j = CInt(TextBox1.Text) For i = 0 To j label1.text = i Next …

Software Development vb.net
Member Avatar for kiyu2keith
0
567
Member Avatar for lxXTaCoXxl

I'm trying to upgrade my class library to my current mathematical skill set and am having trouble with multi-term polynomials, especially those I where I don't know how many terms the user will be putting in. I know that the formula for the first derivative of a polynomial is ax^n …

Software Development algorithm c++
Member Avatar for lxXTaCoXxl
0
301
Member Avatar for lxXTaCoXxl

I'm trying to upgrade my class library to my current mathematical skill set and am having trouble with multi-term polynomials, especially those I where I don't know how many terms the user will be putting in. I know that the formula for the first derivative of a polynomial is ax^n …

Software Development algorithm
Member Avatar for lxXTaCoXxl
0
146
Member Avatar for nitinmbhanu

#include<dos.h> #include<iostream.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<string.h> #include<graphics.h> int y; int i; struct element{ char name[20]; int at_no; double at_wt,at_r,en,ion,density,mp,bp; char ato_wt[20],ato_r[20],eno[20]; char iono[20],densityo[20],mpo[20],bpo[20]; char crs[20]; char sym[4]; char earr[100]; }E[118]; void numberfind(int); void numrfind(int,int); void massfind(double); void namfind(char*); void namlfind(char); void massrfind(double,double); void ionifind(double); void ionirfind(double,double); void enegfind(double); void enegrfind(double,double); …

Software Development c++ os-x
Member Avatar for DeanMSands3
1
251
Member Avatar for nitinmbhanu

[Moderator edit: 3500 lines of code removed as it was totally irrelevant to the question and severely affecting load time of the page]

Software Development c++
Member Avatar for nitinmbhanu
1
265
Member Avatar for adam93

"Add a function to the sets module called issubset with a function signature issubset(set1, set2). Your function should return True if every element in set1 appears in set2. Make sure you document your function fully and remember to include preconditions and postconditions. Also, include some testing for your new function." …

Software Development python
Member Avatar for HiHe
0
90
Member Avatar for socialbutterfli

I need Help Here /* Name: Ashley Powell File Name: Employee */ public class Employee extends Person { private double annualSalary; private int hiredYear; private String ID; public Employee(String initialName, double initialSalary, int joinedYear, String id) { super(initialName); annualSalary = initialSalary; hiredYear = joinedYear; ID = id; } public void …

Software Development java
Member Avatar for socialbutterfli
0
1K
Member Avatar for Piya27

Hi All, I am quite stuck in an operation where I have to calculate a sum using circular reference. Though in Excel , it's quite easy (or already managed by excel itself) to use circular reference but I am not sure how to implement this thing in C#. The problem …

Software Development
Member Avatar for nidhikhetarpal
0
188
Member Avatar for el33t

Hi, I am facing some problem dealing with the qsort funtion. Basically, the below program takes in a bunch of strings from the text file "word.txt" and then implements the qsort function for sorting the list alphabatically and then displaying the sorted list. However, after the sorting is done, all …

Software Development c
Member Avatar for el33t
0
121
Member Avatar for sonia sardana

I have added three images to ImageList..I want to show tooltip....On listview item... [code] Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ListView1.View = View.LargeIcon ListView1.LargeImageList = ImageList1 For lcount As Integer = 1 To 3 ListView1.Items.Add(lcount.ToString, lcount - 1) Next End Sub …

Software Development listview vb.net
Member Avatar for scstetro
0
2K
Member Avatar for problematic:)

hi. I am working on a project that requires a search button. it goes like this. the I will enter data on a text box. then the record that goes with it will display on the 3 textboxes. My problem is I don't know how to code a search buttons. …

Software Development visual-basic
Member Avatar for sai.pawar.p
1
2K
Member Avatar for Signi

Hi, been working on this project and just confusing the heck out of myself. My project is Operation • This project simulates a simple robot that can move a given direction and distance. • To determine the direction the robot will move, the user clicks the N (North), S (South), …

Software Development
Member Avatar for Signi
0
583

The End.