132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vello

[CODE]#include <iostream> #include <fstream> using namespace std; char a[11][11]; bool free(int x, int y) { if (x < 1 && x > 10) { return false; } if (y < 1 && y > 10) { return false; } for (int i = -1; i < 1; i++) { for …

Software Development c++
Member Avatar for Lerner
0
206
Member Avatar for Duece_68

Hey can anyone explain the following code to me [CODE = C++] #define SQUARED(x) {x * x} int main() { int i = SQUARED(3 + 2); return 0; } [/CODE] Why does 'i' in the above code = 11 and not 25????

Software Development c++
Member Avatar for arkoenig
0
151
Member Avatar for zyaday

Hi everyone, I'm trying to write this code. Whenever a user types a letter that matches what is already displayed, it should clean up the list box..the problem here is it is not detecting the keyDown event. What is wrong? Thanks for the help. [CODE]namespace TypingGame { public partial class …

Software Development
Member Avatar for Momerath
0
124
Member Avatar for TahoeSands

For several weeks, I have been trying to wrap my brain around the concept of the paint(Graphics g) method. I have a pretty good idea how it works, but I am still struggling with the "practical" application of the paint method with respect to OOP. I can write small apps …

Software Development java oop
Member Avatar for TahoeSands
0
172
Member Avatar for NewOrder

[CODE] public class InnerEx7 { public static void main(String[] args) { Foo foo=new Foo(); Foo foo2=foo.stam(55); foo2.print(); } } class Foo{ String word="bye"; void print(){} // what does this fucntion do. why do i need it if it is empty public Foo stam(final int x){ final int y=10; class Inner …

Software Development java
Member Avatar for NewOrder
0
115
Member Avatar for helpfullProgram

Hello everybody! This is an amazing place you have built up here and I have never ceased to be amazed by the knowledge available... I have just one question which might seem quite easy to the right person so here goes. I am working with the console in C++ so …

Software Development c++ queue
Member Avatar for SgtMe
0
198
Member Avatar for neil_mahaseth

Is there any difference between a sorted link list and an ordered link list? If there is any difference please show it by giving an example. Thanks

Software Development c++ data-structure
Member Avatar for Narue
0
201
Member Avatar for NotSneaky

I need help with my sort. it will sort first name but when it gets to last name and DOB it wont. Please help me I tried bubble sort and it didnt work. I would like to use bubble sort. import javax.swing.*; import java.util.Scanner; /** * @(#)program 2.java * * …

Software Development java java-swing storage
Member Avatar for Ezzaral
0
104
Member Avatar for kandyhyatt

I'm having a hard time figuring out what i'm doing wrong. Can someone help ? this is the question : In the game of Craps, a "Pass Line" bet proceeds as follows. Using two six-sided dice, the first roll of the dice in a craps round is called the "Come …

Software Development java
Member Avatar for Ezzaral
0
107
Member Avatar for memory

I am new to python and numpy. When I wrote: zeros((20000,20000),int), it returned "MemoryError". Does this mean that this array exceeds python's memory limit? Is there a way to define such big an array in python? Thanks.

Software Development python
Member Avatar for memory
0
115
Member Avatar for tomo_uni

I was wondering how you would display the time in hour/minutes/seconds and then depending on what time of the day it is, it displays the relevant label e.g. Good morning, good afternoon etc thanks

Software Development visual-basic
Member Avatar for AndreRet
0
136
Member Avatar for peterman.k

Hello all, So I am a college student learning c++ (planning to major in computer science). Just my luck, the computer science department using visual studio for their entry level classes, which I have been using with no issues for the last year via a VM; I can access the …

Software Development c++ ide visual-studio
0
160
Member Avatar for xiansen

hey guys, i am to program a simple blackjack program that generates two random cards for the user and ask if the user wants to stay or hit it. so far, when i tried to compile the program, nothing showed up and showed me this message: "The program '[492] alt.exe: …

Software Development c++
Member Avatar for xiansen
0
174
Member Avatar for ChaosKnight11

Hi, I have just downloaded PostgreSQL and would like to add it into my new projects. I have never used PostgreSQL before so I don't know any of its technical details yet. I have registered the PostgreSQL provider using regsvr32 pgoledb.dll or something like that on my Winows partition, everything …

Software Development delphi pascal postgresql
Member Avatar for ChaosKnight11
0
952
Member Avatar for ricardo.crudo

Hello, I'm with difficult in this situation: [CODE] void teste(int *p_int) { printf("&p_int = %li\n", (long int) &p_int); // Line T1 printf("p_int = %li\n", (long int) p_int); // Line T2 p_int = malloc(sizeof(int)); (*p_int) = 123; printf("*p_int = %li\n", (long int) *p_int); // Line T3 } int main(void) { int …

Software Development c
Member Avatar for ricardo.crudo
0
98
Member Avatar for behavet

how can i make program using arrays related to my course civil engineering? answer please?

Software Development c++ engineering
Member Avatar for kes166
0
97
Member Avatar for anantk

I'm working on a soccer management program I had some other members of my group to compile data on 400 real life players into a text file. I planned on reading the text file using a program ,converting individual players into objects and then writing them to another file (in …

Software Development c++ ios
Member Avatar for anantk
0
131
Member Avatar for Rizwan606

does any one know how to Print the contents of the array on even index??

Software Development c++
Member Avatar for Rizwan606
0
385
Member Avatar for dorien

I have a dummy question for you... I am trying to access a function from a class (Key) from another class (Music), but it gives the error: [CODE]‘thiskey’ was not declared in this scope[/CODE] So I guess the Key object thiskey is not public for this class. What I have …

Software Development c++
Member Avatar for kes166
0
184
Member Avatar for jehdo

Objective This assignment has been designed so that you understand the concept of using dynamic memory allocation in C++. After the completion of this assignment you should have a good grasp on: o Array of Objects o Use of new Operator for dynamic memory allocation in C++, for user-defined types. …

Software Development c++ display file-stream objective-c
Member Avatar for Fbody
0
605
Member Avatar for kannibalkiwi

okay, i'm stuck on an assignment! (first post btw, so tell me if i'm doing anything wrong please :) ) okay, my assignment is as follows : Write some efficient and commented python code to do the following: Accept an input value between 33 and 126 and convert it to …

Software Development python
Member Avatar for kannibalkiwi
0
97
Member Avatar for peterman.k

Okay, so I have created and array of a maximum degree, which the user defines, and then inputs their own coefficients according to the size of the polynomial. For example, I ask for degree, they type 2, and then input 1,3 and 5 to create a polynomial: 1 + 3x …

Software Development c++ mathematics
Member Avatar for peterman.k
0
296
Member Avatar for mandoza671

Hi, I'm new to programming so please excuse any obvious questions. I have a text file with the following entries: mydescription, myword yellow, mango yellow, banana orange, orange green, pineapple green, mango pink, mango What's important is that there is no order, both the 'mydescription' field and 'myword' change randomly. …

Software Development algorithm python
Member Avatar for mandoza671
0
160
Member Avatar for RayvenHawk

I'm creating a compression program for one of my classes and I'm getting stumped on one aspect of it which is more cosmetic than anything but I'm going for gold here I suppose. Anyway I have a windows form that has a textbox with a button that executes FolderBrowserDiaglog (which …

Software Development
Member Avatar for RayvenHawk
0
253
Member Avatar for arjen

hello guys, I need help regarding with my listview how will you make in listview if the name is already exist in the listview it will no longer accept or there is a msgbox("name already in listview") and the name is in the first column of the listview. Or what …

Software Development listview vb.net
Member Avatar for arjen
0
208
Member Avatar for K1kk0z90

Hi all! :) I've made a simple application for a shop, where the user inserts barcodes of products, these are added to a list and available pieces in the database are decremented. When the user clicks the Pay button, I want the program to print a receipt. How can I …

Software Development
Member Avatar for K1kk0z90
0
99
Member Avatar for omfgtom

So, this is the little compound interest program i wrote that is due tommorow. As far as I can tell it should be working, but it says something about an undefined reference? All help appreciated. [code]#include <cstdlib> #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main(int argc, char …

Software Development c++
Member Avatar for Valaraukar
0
115
Member Avatar for jigglymig1

the problem stats" [B]copy instructor:[/B] initializes a copy of an IntSet given another IntSet as a parameter. The new IntSet is a copy of the IntSet parameter. i need to copy my class using a constructor. IntSet is the class which is a class for setting up arrays as true …

Software Development
Member Avatar for jigglymig1
0
118
Member Avatar for smithr3

Hi there. The problem that I'm experiencing here is quite a specific one, and after a few searches, I concluded that I ought to just ask. Tbh, I'm a little bit unsure what to search exactly! I have calculated earlier in my program various values in various arrays, angle[], t[], …

Software Development c++ file-system
Member Avatar for Ancient Dragon
0
128
Member Avatar for ashishchoure

Hi, I am just trying to do some down casting. here is the code. [CODE] class Base { public: void virtual test() { cout << "Base Test"; } }; class Derived : public Base { int i; int j; public: void testD() { i = 8; j = 9; cout …

Software Development c++
Member Avatar for Fbody
0
123
Member Avatar for Katana24

Hi, just started using Xcode to code C programs. Im trying to create multiple programs in the same source folder but Im getting an error message. When i select 'File' -> 'New File' -> '.C File' I can create the file fine: it creates the .c program and a header …

Software Development c c# c++
Member Avatar for creeps
0
217
Member Avatar for zachattack05

Stupid question I know. But I have looked for HOURS on examples of how to do this. Every single example I can find uses streamwriter or streamreader which reads and writes text, not byte arrays. Is it possible to get a byte array from a CryptoStream? The closest I can …

Software Development
Member Avatar for zachattack05
0
894
Member Avatar for man3388

Adding excel data into hash table: [CODE] Hashtable ExcelSheets = new Hashtable(); System.Data.DataTable dt1 = new System.Data.DataTable(); da.Fill(dt1); System.Data.DataRow dr; //System.Data.DataColumn dc; #endregion # region adding excel file into hash table if (dt1.Rows.Count > 0) { for (int c = 0; c < dt1.Rows.Count; c++) { // if (c > …

Software Development microsoft-office xml
0
101
Member Avatar for KrazyKitsune

Is it possible for the user to input a Python snippet and run it? Like this: [code=syntax]x = raw_input("Python snippet: ") #And then run the script typed in here[/code] Also, we know how errors happen all the time. Is it possible to make it so that when errors happen because …

Software Development python
Member Avatar for snippsat
0
110
Member Avatar for HansomePrincess

guys... please help me to save, edit and delete files in the data grid... can you give me the codes so i can do it... i badly need it for my system... thanks..

Software Development vb.net
Member Avatar for JJCollins
0
189
Member Avatar for Kingcoder210

I have written code to show records in a datagridview but it shows nothing. I have tried to debug & when it step into GetData function following codes [Code] Catch ex As Exception returnData = Nothing If connection.State = ConnectionState.Open Then connection.Close() End If [/Code] become gray & it shows …

Software Development vb.net
Member Avatar for JJCollins
0
102
Member Avatar for PerplexedB

VB2008 won't let me drag my lblBase class from the toolbox onto a form in design mode. Why? Is there a way around this? [CODE]Public Class lblBase Inherits System.Windows.Forms.Label 'Public Sub New() 'MyBase.new() ' Me.BackColor = Me.Parent.BackColor 'End Sub End Clas[/CODE]

Software Development oop vb.net
Member Avatar for JJCollins
0
131
Member Avatar for timb89

One aspect of comp science that really lets me down is loop invariants. A question from a past paper that i cant get is to find the loop invariant of the following segment of code: [CODE]bool linearSearchIter(int a[], int n, int target) { int i = 0; bool found = …

Software Development c++
Member Avatar for Narue
0
152
Member Avatar for fourty

Hey pals anyone know : I need a code under a cmdhelp that 1. opens the windows help 2. Opens a file in the database containing help msg on the project. I also need to know how i could link a folder with my project or lets say a text …

Software Development visual-basic
Member Avatar for AndreRet
0
73
Member Avatar for jumpdlite

hey guys, I am supposed to write 3 boolean functions listed below. my problem is that I don't really understand the questions and don't know where to start. it would be really great if someone just do one of the functions to give me an example so i could finish …

Software Development c++
Member Avatar for Stefano Mtangoo
0
174
Member Avatar for brontok214

write a c++ program that stores the following numbers in the array named miles:15,22,16,18,27,23, and 20. have your program copy the data stored in miles to another program named dist, and then display the values in the dist array. your program should use pointer rotation when copying and displaying array …

Software Development c++
Member Avatar for Fbody
0
245
Member Avatar for Vagelis44

Hi, I'm trying to find a way to make some kind of monitor in C. I found this but i get : error: config.h: No such file or directory error: glibtop.h: No such file or directory error: glibtop/error.h: No such file or directory error: glibtop/cpu.h: No such file or directory …

Software Development c ubuntu
Member Avatar for harshil_shah007
0
548
Member Avatar for kshaaban

does anyone know how to make a variable type to store GUIDS? I can currently read GUIDS however storing them is proving difficult. Ideally I would like to do this to compare them and organise them based on a variable type. I am a beginner however am eager to jump …

Software Development c++
Member Avatar for kshaaban
0
221
Member Avatar for ekailan

I appreciate any help ........I treid many solution it did not work! [CODE]aTree.AddString(L"barak");[/CODE]//this is working 100% when I tried to do this : [CODE]char *p; p = new char[500]; //read the value of p from file one line at a time aTree.AddString(p);//not working [/CODE]

Software Development c++
Member Avatar for ekailan
0
204
Member Avatar for mahmoud209

Hi everyone, i was working on a project lately where my manager asked me to develop a vb application that can download files of the website <a href="http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm">http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm</a>[<a href="http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm" target="_blank" title="New Window">^</a>] Internally. i was thinking if i can make a form that display all downloadable files on the website …

Software Development vb.net window-manager
Member Avatar for GeekByChoiCe
0
276
Member Avatar for ichwara

I am doing a project on hospital management system in vb6. i have a problem on how the program will be accessed by different users using a network and how to store data. someone help me

Software Development visual-basic
Member Avatar for AndreRet
0
79
Member Avatar for waleed.makarem

Dear all , I am trying to develop code that will check for each location (latitude and longitude) for a nmea file ( contains over 200,000 point) to check if this file contains some points that was close to a certain location or not . How can we do this …

Software Development vb.net
0
141
Member Avatar for onus

I am working on a problem (re inventing the wheel for learning) I have a mxn matric (which is my simplified way of saying it is RAM with bytes on it) Some of the locations on this metric is filled with some data and some places are empty. The mxn …

Software Development algorithm c data-structure
Member Avatar for Banfa
0
146
Member Avatar for Shijo Jose

I wish to do a program in c++ that enables me to play music as part of my school project. I want to know if is this is possible. I also wish to know if photos and other media can be similarly accessed and where i can get information on …

Software Development audio c++
Member Avatar for sachin.tendul
0
208
Member Avatar for arjen

print a list of integers from 1 to N that are both divisible by 2 and 3.and after producing the list, count the numbers of integers found.

Software Development c c# c++
Member Avatar for LevyDee
0
286

The End.