132,729 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for VBNick

hi, I have used LoadImage() to load a bitmap as HBITMAP. If I use SelectObject() to attach it to an HDC, and then BitBlt() it to the screen, that works fine. I need an array that would be compatible with the one produced by CreateDIBSection(). I have tried GetBitmapBits(), and …

Software Development c++
Member Avatar for VBNick
0
475
Member Avatar for tomtetlaw

Im testing out blit() and i ran into this error: [code=python] Traceback (most recent call last): File "/home/tom/Desktop/pygame/test/main.py", line 15, in <module> screen.blit('image.jpg', (10,10)) TypeError: argument 1 must be pygame.Surface, not str this is my code: import pygame pygame.init() running = 1 while running == 1: screen = pygame.display.set_mode((800, 600)) …

Software Development python
Member Avatar for tomtetlaw
0
2K
Member Avatar for sleepytoast

The idea of the entire program is to play a simplified version of war that's why its 28 cards. Anyway my problem comes from the dealRandomCard function when I compile it it says there needs to be another ) before time. I'm not sure what to do. I appreciate the …

Software Development c++
Member Avatar for VernonDozier
0
126
Member Avatar for sivak

can anyone send me the javascript material or any link for material?

Software Development java javascript
Member Avatar for serkan sendur
0
74
Member Avatar for rana2011

the programe output the sum of the factor of a number entered by user and when he enter 0 the programe should display output with no result for 0 here is the code #include<iostream> #include<iomanip> using namespace std; int main() { int x,i; int z=1; int sum=0; while(cin>>x) { if(x!=0) …

Software Development c++
Member Avatar for Freaky_Chris
0
75
Member Avatar for Rocket452

Hi, I am using a C# application that interacts with a TSQL stored procedure. The problem is that my SqlDataReader property .RecordsAffected always returns -1 regardless of whatever kind of select, update, or delete query I run. Here is my relevant code: [code] SqlDataReader myReader = null; SqlCommand command = …

Software Development c#
Member Avatar for LizR
0
166
Member Avatar for ItecKid

Hello, I am trying to write the quick sort algorithm to take in an array of 20 random integers and sort them. However, it is producing weird output for the sorted list. My code is as follows, can anyone give me a little help here? [code=C++] #include <iostream> #include <vector> …

Software Development algorithm c++
Member Avatar for Freaky_Chris
0
109
Member Avatar for Lukezzz

How will it be possible to add "Gray" lines in a Menu (MenuStrip). I have attached a picture of how I meen. Example WordPad in Windows uses these type of menus to separate MenuChoises.

Software Development c++
Member Avatar for Lukezzz
0
131
Member Avatar for jbennet

basically i have a 3d array of chars, i need to be able to save and load it using text files. Any as to how i would actually do it? Im familiar with reading lines using BuffererdReader and stuff. Im thinking use a loop to save each element to a …

Software Development file-system java
Member Avatar for ~s.o.s~
0
110
Member Avatar for koa636

error message cannot find constructor `lottery(int[])` import java.util.Random; public class Lottery { private final int NUM_DIGITS = 5; private int[] lotteryNumbers = new int[NUM_DIGITS]; private int[] userNumbers; private int matches; public int[] getLottery(int[] l) { // Create an array the length of l. lotteryNumbers = new int[5]; // Random object. …

Software Development java
Member Avatar for Ezzaral
0
115
Member Avatar for gothicmisery85

I am working on a program, and I can't figure out what I'm doing wrong. Any help would be appreciated. Here is what I have to do: [b] Write a procedure named St_concat that concatenates a source string to the end of a target string. Sufficient space must exist in …

Software Development algorithm assembly
Member Avatar for crunchy_frog
0
3K
Member Avatar for asifjavaid

Hi, I am new to COM Programming. I want to initialize COM library. I am calling hr = CoInitializeEX(NULL); but hr = S_FAIL. and my code is stopped. What I have to do further to execute COM program written in VC++.NET 2005. -- Regards, Asif

Software Development c++
Member Avatar for Laiq Ahmed
0
203
Member Avatar for FrancisC07

oopss i still have a problem!!.. What's wrong with my code? [code=cplusplus] main() { int a[4]; int b[4]; int counter,sum=0; cout<<"JANUARY"; for(counter=0;counter<4;counter++) { cout<<"Numbers of Rainfall:"; cin>>a[counter]; } for(counter=0;counter<4;counter++) { sum+=a[counter]; } cout<<"The numbers of rainfall in the first month"<<sum<<endl; cout<<FEBRUARY; for(counter=0;counter<4;counter++) { cout<<"Numbers of Rainfall"; cin>>b[counter]; } for(counter=0;counter<4;counter++) { …

Software Development c++
Member Avatar for MosaicFuneral
0
112
Member Avatar for asurmen28

guys! i realy need your help! i have this big problem of how to convert hex to decmal. theoreticaly it is very easy but the problem is that in assembly, everything is done in hex example if u add 10d+10d, assembly will add it as Ah+Ah = 14h. thats where …

Software Development assembly
Member Avatar for abello00
0
129
Member Avatar for bradbobak

[code] #include <iostream> class base { public: void print() { std::cout << "base" << std::endl; } }; template< class B > class der : public B { int i; public: virtual void print() { std::cout << (B *)this << std::endl; B::print(); } }; int main(int, char **) { der< der< …

Software Development c++
Member Avatar for bradbobak
0
307
Member Avatar for Seamus McCarthy

Hey can anyone offer me any advice on updating my customer file, I created the blank records and can create a record in the newCustomer function but can’t seem to access that record again for updating, does anyone know where I’m gone wrong. Any help would be greatly appreciated. [CODE]fstream …

Software Development c++ ios
Member Avatar for ku.bis
0
166
Member Avatar for MxDev

Hi guys, i've a problem when running java application connected with sqlite database the connection is done with netbeans IDE, but when i trying to run the application i get the following error [COLOR="Red"]init: deps-jar: compile: run: 06/12/2008 04:42:49 ص org.jdesktop.application.Application$1 run [COLOR="Green"]SEVERE: Application class desktopapplication3.DesktopApplication3 failed to launch javax.persistence.PersistenceException: …

Software Development ide java java-netbeans oracle sqlite
Member Avatar for stephen84s
0
171
Member Avatar for MxDev

hi, i'm trying to reference a class outside the current working package how to reference this class to create an object???

Software Development java
Member Avatar for stephen84s
0
48
Member Avatar for 666kennedy

basically here is my code, sorry if its untidy. you will see in the crossover function i want to use the rand. i get errors like "too many arguments for int rand()" [CODE] #include <iostream.h> #include <conio.h> #include <iomanip.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <ctime> #include <cstdlib> #pragma …

Software Development c++
Member Avatar for ArkM
0
156
Member Avatar for FrancisC07

i need a help on how to add the value of an array to another value of an array? i dont need the whole program.. i just want to know what will i do in order to add the 4 values of an array using the for loop statement. for …

Software Development c++
Member Avatar for FrancisC07
0
191
Member Avatar for asmit1987

Hello People , I am creating a project in VB.net . now the problem is there are several forms and i start with the login form my login consist of three major fields username , password , type now the type here is the type of user accessing the application …

Software Development vb.net
Member Avatar for kinyuadave
0
170
Member Avatar for krhillery

Alright, so for the output: 0 2 4 6 8 10 1 3 5 7 9 11 3 6 9 12 15 18 6 10 14 18 22 26 ... (the pattern presented goes on forever) a code must be written to create it. I know I need a for …

Software Development java
Member Avatar for stultuske
0
127
Member Avatar for Kshiteesh

Dear frens, from your help I succeeded in creating data grid . Thank you for it. Now i need to generate report from data grid. my data grid code is as follows; Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Db1DataSet1.Clear() Dim conStr As String = …

Software Development vb.net
Member Avatar for gomathinayagam
0
476
Member Avatar for meistrizy

Hello. Thanks in advance for helping a newbie. I am supposed to add a bottom loop (which I assume is a do while) that asks the user if he/she wishes to compute another series and as long as the answer is 'Y' or 'y' to iterate the loop until 'n' …

Software Development c++
Member Avatar for meistrizy
0
59
Member Avatar for roidel

Hi, i found this code from an article, i want to compile this code, buat I don't have file polygon.h. Can you send file polygon.h to me, because i have search from any web buat i don't find it. This the code [code=c] #include<stdio.h> #include<conio.h> #include<windows.h> #include<math.h> #include<stdlib.h> #include<GL/glut.h> #define …

Software Development c++ file-system
Member Avatar for jencas
0
176
Member Avatar for gm999

Hi guys, I'm quite new to C++ and I'm having problems with a simple operation. I have to resize an array of structs, but seeing as I am having a problem with the concept, i'll post an example with a simple array of integers. Please bear in mind that this …

Software Development c++
Member Avatar for gm999
0
88
Member Avatar for samishunk

A Book shop maintains the inventory of books that are being sold at the shop. The list includes details such as author , title , price , publisher and stock position. Whenever a customer wants a book , the sales person inputs the title and author and the system searches …

Software Development c++
Member Avatar for samishunk
0
189
Member Avatar for lllllIllIlllI

Hi guys, I have a program that lets the user play a sound but i was wanting to know how i could make it so the user could vary the speed in which the sound plays so the sound can play slowly and quickly and normaly as well. Is this …

Software Development python
Member Avatar for lllllIllIlllI
0
3K
Member Avatar for Dewey1040

I understand the algorithm SelectionSort, but once again my problem is the easy part( i think the college life is affecting my mind ). How in the world do you read in an unknown number of ints from a file? I thought i did it right but when i run …

Software Development algorithm c
Member Avatar for ArkM
0
97
Member Avatar for lmastex

Hi. I want my Insertion method in my link list class not to insert repeated elements. I have tried several ways but I have seriously ugly bugs in my code: [code=cplusplus] template <typename ListElement> void List <ListElement>::Insert() { NodePtr Ptr; Ptr = new Node; bool repeated = true; if (Ptr …

Software Development c++ storage
Member Avatar for Laiq Ahmed
0
173
Member Avatar for umairsario
Member Avatar for masijade
0
115
Member Avatar for stephen lowry

hi guys i have fairly good knowledge of vb6 but cant for some reason get my head around this i want to develop program where you can add multiple names (text string) then press generate and a name is randomly selected for quiz purpose , the name or string dos'nt …

Software Development visual-basic
Member Avatar for stephen lowry
0
79
Member Avatar for karang

Hi I have a virtual function setStartupDirectory() virtual bool setStartupDirectory(const SysString &sStartupDirectory) = 0; When I am calling this function setStartupDirectory((const SysString &)m_pApplicationFolderNarrow); I am getting this error Error 2 error C2664: 'setStartupDirectory' : cannot convert parameter 1 from 'const SysString' to 'const SysString &' Am I missing something

Software Development c++
Member Avatar for sweeya
0
129
Member Avatar for murderotica

Hello there, I've been working with threads right and I'm kinda stuck with how to implement the BackgroundWorker while I drop a lot of files in my form. I'm having a hard time how to arrange my code, specially on how to deal with the DoWork event of the BackgroundWorker …

Software Development
Member Avatar for LizR
0
110
Member Avatar for ACRobison02

I have to create a program with parallele arrays that recieves information from a file telling it how many salsas their are (their can't be more than 10). One array containts the name of the salsa, the other array contains the number of salsa jars sold. Then I have to …

Software Development c++
Member Avatar for cikara21
0
106
Member Avatar for Jwhispers

I had to write a program to add two angles together. I've got the meat done, but i'm having a hard time figuring out how to code the program when i add the angles together so that when say Seconds is more than 60 it adds 1 to minutes. example: …

Software Development c++
Member Avatar for Jwhispers
0
265
Member Avatar for piznut25

[CODE]/* Filename: odometer.cpp * Author: Tom Pizzo * Email address: pizzotm@clarkson.edu * Description: Program to track fuel and mileage for an automotive vehicle. * Last changed: Dec 1, 2008 */ #include <iostream> using namespace std; const char YES = 'y'; class Odometer { public: Odometer (); //Constructor function to initialize …

Software Development c++ ios
Member Avatar for cikara21
0
138
Member Avatar for kitty7

Hello, I am a new programmer attempting to tackle this puzzle after a couple of setbacks. I was excited about this project, but I am very stuck, and I am not sure where to go, or even if I'm on the right track. Okay, so let's get down to the …

Software Development c++ puzzle
Member Avatar for kitty7
0
135
Member Avatar for namehere05

Ah right! Im on my first steps on c++, What Im trying to do is have this "basic node" class wich just take an id and from there usign inheritance make "linked list node" and "binary tree node" classes my code so far looks like this [CODE]void main() { sLink* …

Software Development c++ linked-list
Member Avatar for namehere05
0
113
Member Avatar for acperson

I've been trying to fix these errors for a while now and I'm having difficulty. Can anyone help? I've attached my header file, .cpp file and main. The C2533 and C2511 are both in my .cpp file. c:\documents and settings\tina\my documents\visual studio 2008\projects\csci112lab4\csci112lab4\invoice.cpp(15) : error C2533: 'Invoice::{ctor}' : constructors not …

Software Development c++ visual-studio
Member Avatar for acperson
0
463
Member Avatar for Bleek

hey... im in a c++ class at school but i also program at home. my teacher refuses to teach me graphics and i wanted to know if there was an easy way to just basically cout a graphic. if this is noobish and i need to learn a lot more …

Software Development c c# c++
Member Avatar for Manutebecker
0
395
Member Avatar for anbuninja

Im having a hard time where to start with this assignment. Obviously I did the easy part now its time for the loop which i just dont get. heres how the program will run [B]Enter the initial balance ===> 1000 Enter the number of months to cover: ===> 3 Enter …

Software Development c++
Member Avatar for Lerner
0
115
Member Avatar for spi02

Hi everyone! My problem basically boils down to this: I have 71 items, and each item can be either on or off. I need to consider all the combinations (permutations?) and go through a 100 for loop for each of the 2^71 scenarios...on the scale of 10^23. Two questions: [CODE]1) …

Software Development java
Member Avatar for shaun.husain
0
103
Member Avatar for qaizaar

how do i read an input in LC-3 where it checks for yes or no as an answer to a prompt and returns 1 if yes and no if 0. thanks

Software Development assembly c#
Member Avatar for c0dex
0
137
Member Avatar for Awebb999

I just learned about bubble sort and still don't know how to make it work in my program I hope someone can help me. This is my task I should use parallel arrays (of size 20) for student name, student number, test score, and letter grade. The list must be …

Software Development c++
Member Avatar for Awebb999
0
152
Member Avatar for VirusTalker

Okay so this is the deal. I want to make a call to a routine that replaces all of one certain type of integer with a number. I have it to where it is replaceing the first, however, it misses the tail node.[ICODE] public static SimpleList<Integer> replaceAll(Integer old, Integer nEw, …

Software Development java
Member Avatar for shaun.husain
0
158
Member Avatar for FTProtocol

ok so im trying to find a certain string in a txt file and once its found it needs to skip that line, the next line then add the following 2 lines into their own buffers. EG: Example ofomgwtfcantfindit kthx Woot Bang asdasd 'asdasd asdasd so it finds the string …

Software Development c++
Member Avatar for Ancient Dragon
0
188
Member Avatar for ojung
Member Avatar for jbody

There is something that I saw and wanted to check if it is really wrong, as I thought. In the second edition of The C Programming Language 2nd ED by Brian Kernighan and Denis Ritchie, in the section of 5.2 Complicated Declarations, in page 109, it is written so, isn't …

Software Development c
Member Avatar for ArkM
0
119
Member Avatar for cherryteresa

Hi there. I had to make a code to print out a Pascal Triangle. But I'm not getting it to display properly. For example, if the user types in 4, then it will print: 1 1 1 2 1 3 3 But it should print 1 1 1 1 2 …

Software Development c++ pascal
Member Avatar for cherryteresa
0
293

The End.