132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for MasterHacker110

I again have a C code that i need in c++ #include <stdio.h> void hexDump (char *desc, void *addr, int len) { int i; unsigned char buff[999]; unsigned char *pc = addr; // Output description if given. if (desc != NULL) printf ("%s:\n", desc); // Process every byte in the …

Software Development c++
Member Avatar for BobS0327
0
1K
Member Avatar for james6754

I wrote about this the other day but do not think I explained it too clearly...I shall try again... So my problem is this...when I am trying to allocate memory to a pointer, it fails. This is my MatrixClass definition.. class MatrixClass { public: MatrixClass(int m, int n); MatrixClass(void); virtual …

Software Development c++
Member Avatar for Lerner
0
262
Member Avatar for hwoarang69

trying to copy pointer in array. lets say *pointer has the value "COMPUTER". and i want to store in array[o]; note: i want to use strcat to do this and i do not want to do some thing like "array[0]" char test[10]; char *point; //has the value "COMPUTER" for(int i …

Software Development c
Member Avatar for Vish0203
0
184
Member Avatar for codechrysalis

So I have not generated the event for the picturebox but lets say the picture box is "private void pictureBox2_BeverageItems" followed by curly bracelts . I have been looking all over and couldnt find a correct implementation my guess is to probably use "streamreader" but im still fairly new to …

Software Development image
Member Avatar for CeilingSpy
0
1K
Member Avatar for sanjuktamuna

include<stdio.h> struct address{ char city[20],country[20],state[20]; }; struct customer{ int acount; char name[20]; float bal; struct address add; }; void display(struct customer * ,int); void main() { int i,size; printf("enter the number of customers"); scanf("%d",&size); struct customer cus[size]; struct customer * c[size]; for(i=0;i<size;i++) { printf("!"); scanf("%s",&cus[i].name); printf("!"); scanf("%d",&cus[i].acount); printf("!"); scanf("%f",&cus[i].bal); printf("!"); …

Software Development c
Member Avatar for Vish0203
0
177
Member Avatar for abhik1368

Well I have a 2D array matrix file like [CODE] 0.5 0.8 0.9 0.10 1.0 0.5 0.75 0.6 2.5 6.0 0.5 0.53 3.0 2.75 0.9 0.5 I want to read this file as csv and edit the file such as when the values are above (> 1) i want to …

Software Development perl
Member Avatar for 2teez
0
112
Member Avatar for justinfritz

I am having trouble with this part of my program assignment. I have created and compiled the three separate implementation files that design the three classes, they each have a default constructor, overloaded constructor, and a display function. //************************************************************************************************************ "When your program is working correctly, define an array of pointers …

Software Development c++ oop
Member Avatar for Saith
0
314
Member Avatar for jiggaman77777

I'm having a problem getting the number of integers greater than the average in my array to display. I keep getting "You have 1 number greater than the average when there are 5 that are greater. Pls help!!! This is the code I've devolped so far: #include <iostream> using namespace …

Software Development c++ mathematics
Member Avatar for ravenous
0
2K
Member Avatar for ChrisMackle

So im learning SDL to get an idea on game programming for my career as a game developer. I havent done any learning for a couple of months after getting stuck on this problem. So im using a lazyfoo.net tutorial engine. that moves a player and has a collision with …

Software Development c++ career
Member Avatar for sfuo
0
511
Member Avatar for migelitto

Hi. I am making JMenuBars in my way but i start to understand, that my way ir crap! :D So I want to know, if there is a way, **how to know, which item from menu is set.** For example - i have menu with actors - i choose one, …

Software Development java
Member Avatar for migelitto
0
203
Member Avatar for alexpegg1

I am trying to create a rudimentary number guessing program with java, and it is not working out. I think i have some useless stuff in there, but whatever: import java.util.Random; import java.io.* ; public final class Number_guesser { public static final void main(String... aArgs){ InputStreamReader istream = new InputStreamReader(System.in) …

Software Development java
Member Avatar for NormR1
0
258
Member Avatar for poolet

If someone can simplify this code I will appretiate since I don;t have time... !!!! Thank you in advance..!! Regards..!!! CODE::: #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <stdio.h> #include <stdlib.h> using namespace std; int DisplayMenu(); //function that display the menu of the program int Quit(); //quit function …

Software Development c++
Member Avatar for poolet
0
239
Member Avatar for vkk

Hi Guys, I am trying to retrieve all the users in the Active Directory and dump into a Sql Server Table(Sql2008). I was able to search one employee at a time but could not able to search all the employees in the Active Directory. Basically i want to retrieve 1.SamAccountname …

Software Development sql vb.net
Member Avatar for vkk
0
279
Member Avatar for caltech

In my code below you will see at the bottom my very lame attempt at sorting the vector array of employee records by name, alphabetically. My friend tried to tell me how I'm supposed to do it, but I can't make any sense of it really, so if someone could …

Software Development algorithm c++
Member Avatar for caltech
0
277
Member Avatar for benclifford

I am trying to use the size of an array to determine how many entrys are in the array as follows sizeof(array)/sizeof(array type) = number of elements in the array. I then wish to use this to add more data to the array as follows array[sizeof(array)/sizeof(array type)] = new Object(object …

Software Development c++
Member Avatar for triumphost
0
562
Member Avatar for MasterHacker110

My code gives this error: relocation truncated to fit: R_386_16 against `.data' section .text section .data text_string db 'This is my cool new OS!', 0 global _start global print_string _start: mov ax, 07C0h ; Set up 4K stack space after this bootloader add ax, 288 ; (4096 + 512) / …

Software Development assembly
0
92
Member Avatar for Nimzy

Hey can u help me with this code..?? Its a simple game of moving darts I made on applet.. I want to restart the game from starting when i click replay but this ain't happening, please check the code: import java.io.*; import java.net.*; import java.applet.*; import java.awt.*; import java.awt.event.*; public …

Software Development java
Member Avatar for NormR1
0
834
Member Avatar for gerchi152

My process is to multiply the given points in B8, D8, F8, H8, J8, L8, and N8 to A3, B3, C3, D3, E3, F3, G3 respectively. this procedure is to be processed in C8, E8, G8, I8, K8, M8, and O8. after multiplying, the process should perform =sum(C8,E8,G8,I8,K8,M8,O8) to P8. …

Software Development microsoft-office visual-basic
Member Avatar for davesexcel
0
384
Member Avatar for soham.m17

JLabel[] x=new JLabel[10]; int i=0; for(component comps : a.getComponent_list()) { x[i]=comps.getType().getImg(); x[i].setBounds(comps.getPosition().x, comps.getPosition().y, comps.getType().getWidth(), comps.getType().getHeight()); System.out.println("Coming Here,"+comps.getId()+","+comps.getPosition().x); this.add(x[i]); i++; } repaint(); I want to have all the labels in their position. after this function. but only the last added label is shown. What can I do?

Software Development java
Member Avatar for soham.m17
0
724
Member Avatar for ashboi

I'm trying to write a program that uses vector to store the grades for the number of students entered.But i seem to be getting some problems with my code. I am able to enter the number of students, but when it asks for the grades, the program exits. I hope …

Software Development c++
Member Avatar for ashboi
0
2K
Member Avatar for razamughal67

Hello to all we want to lock or password to a folder in vb6 please tell me anybody thanks

Software Development visual-basic
Member Avatar for razamughal67
0
443
Member Avatar for William Ng

I try to convert programType from string to integer value but it show me "Input string was not in a correct format." error..can anyone help to to solve this question? Private Sub cmbProgram_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbProgram.SelectionChangeCommitted 'converting string to integer value' Dim programType As …

Software Development vb.net
Member Avatar for IIM
0
313
Member Avatar for renzlo

Hi Java Developers, I don't know if this is the right place to ask but I hope It is. First of all this is not my programming language, I am an intermediate .net developer, I just came up with this problem that I need to solve which what the thread …

Software Development java oracle sql
Member Avatar for renzlo
0
328
Member Avatar for sunny124

Hi, I am trying to return a ref cursor from a stored function but I keep getting this error message 'Specified argument was out of range of valid values'. The reference cursor does point to correct data, I used a anonymous block in oracle to test it out. How can …

Software Development oracle vb.net
0
100
Member Avatar for bhawna_5nov

here is the following code in java applet.. [CODE]//this is one applet which has to be opened when button is clicked... import java.awt.*; import java.applet.*; import java.awt.event.*; public class Order_info extends Applet implements ItemListener { private Label l,l1,l2; private TextField t=new TextField(); private Choice list; String s,selection; public void init() …

Software Development java
Member Avatar for NormR1
0
1K
Member Avatar for pritish.kamath

i wanted to display a pattern like this 4444 333 22 1 i used the following code import java.util.*; public class PatternExp { public static void main (String args[]) { Scanner src=new Scanner(System.in); System.out.println("Enter the number of lines needed"); int n=src.nextInt(); for (int i=n; i>0; i--) { for(int j=n; j>0; …

Software Development display java
Member Avatar for pritish.kamath
0
129
Member Avatar for sing1006

`Public Class login Dim cnn As New OleDb.OleDbConnection Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim cmd As New OleDb.OleDbCommand If Not cnn.State = ConnectionState.Open Then cnn.Open() End If cmd.Connection = cnn If cmd.CommandText = "SELECT UName FROM Account WHERE UName =" & Me.UsernameTextBox.Text Then …

Software Development open-source vb.net
Member Avatar for adam_k
0
143
Member Avatar for prerit

I have a project on image processing. I have a picturebox with an image loaded in it via a openfiledialog box. I was trying to zoom an image in the picturebox by certain pecentage i.e **50%, 100% 150%** and **200%** . All this is done when a user clicks on …

Software Development image
Member Avatar for prerit
0
8K
Member Avatar for sam pinto

can anyone tell me examples of 3 mouse events(which will be easiest to create) and 3 keyboard events(which will be easiest to create) please! ASAP

Software Development vb.net
Member Avatar for Hilal2009
0
114
Member Avatar for abhimanipal

Hi everybody, Please excuse the noob question as I am new to STL in C++. I am trying to write a very basic program which uses iota. However my compiler is complaining that iota does not exist in algorithm. Some other forums suggested including <backward/algo.h> as iota could have been …

Software Development c++ ubuntu
Member Avatar for mike_2000_17
0
2K
Member Avatar for c++bob1234

Define a base class person that will contain universal information, including name, address, birth date, gender and identification (student, worker etc). Derive from this class the following classes: Student Worker Student_worker Add variable school to student and company to worker class. Write a program that asks user to input information …

Software Development c++
Member Avatar for c++bob1234
0
128
Member Avatar for m1n1m3

Hi, I have a simple usb device that i can plug into a PC. The thing im looking for in user interface that is: 1) Multiplatform 2) Manages it own drivers (for plug in USB device) 3) No install file, a executable. The thing im looking for is like this …

Member Avatar for jackmaverick1
0
299
Member Avatar for pclovechristian

I have to create a program that will prompt a user radius and keep adding them until user says no. Then, the program gotta able to hold those numbers and calculate two things: Surface area and Volume. The program also gotta able to Sort the numbers by its volume(low to …

Software Development c++
Member Avatar for Lerner
0
135
Member Avatar for kiail

Hello everyone. I'm trying to write a phone number word generator. I have the basic form setup and a dialing pad. The dialing pad dials just like a phone, except it only has keys 2-9. I'm trying to print out all the possibilities a phone number could produce using streamwriter. …

Software Development
Member Avatar for kiail
0
323
Member Avatar for jackmaverick1

I've got a game, and I'm trying to do it right. I've got a spritesheet (which is really just a class that loads images for easy access. It seems to work, but then my tile system starts, and it fails in an interesting way - it loads only the foreground, …

Software Development gaming image java
Member Avatar for jackmaverick1
0
198
Member Avatar for c++bob1234

#include<iostream> using namespace std; #include<string> #define INT_MAX 100000 #define INT_MIN 0 using namespace std; class Automobile { public: Automobile(); void read(); bool is_cheaper_than(??????) const; bool better_mileage_than(???????) const; bool better_finanace_than(??????) const; void print() const; private: string name; float price; float mileage; float finance; }; Automobile::Automobile() { name=" "; price=INT_MIN; mileage=INT_MAX; } …

Software Development c++ finance
Member Avatar for Saith
0
300
Member Avatar for FraidaL

I'm getting an error with this code. Both the findMax and findMin lines in main say "Invalid conversion from 'int' to 'int*'". What does it mean? #include <iostream> using namespace std; int findMax(int[],int); int findMin(int[],int); int main () { int max, min, x; findMax(max,x); findMin(min,x); return 0; } int findMax(int …

Software Development c++
Member Avatar for Saith
0
255
Member Avatar for abhimanipal

Hi Folks, Here is another noob question. I am trying to write a simple predicate for the find_if function in STL. Here is my code #include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; class InRange{ const int& low; const int& high; public: InRange(const int& l, const int& h): low(l), high(h){} bool …

Software Development algorithm c++
Member Avatar for Saith
0
412
Member Avatar for dariaveltman

please tell what am I doing wrong. #include <iostream> using namespace std; int main() { char name[3][30]; int i, j; for(i=0;i<=2;i++) { cout << "Please enter name: "; cin >> name[i]; } for(i=0;i<=1;i++) { for(j=i+1;j<=2;j++) { char temp; if(name[i] > name[j]) { temp = name[i]; name[i] = name[j]; name[j] = …

Software Development c++
Member Avatar for Sahil89
0
183
Member Avatar for Andy90

I have created an application which requires double value processing, I want to add trackbar so that user can select any double value he wants. But I m unable to set min and max value as double for trackbar. Help me.

Software Development
Member Avatar for d.hussain
0
320
Member Avatar for skatamatic

I am trying to remember a bit of bitwise math to deal with some CAN bus stuff in c#. Basically, I am trying to create a class that takes in an integer that represents an identifier portion of a CAN frame. They look like this: Priority - 3 bits EXT …

Software Development
0
104
Member Avatar for CWoods22

I am having trouble getting this to run. It compiles just fun, and it will let you click one button but does not recognize a second button click. What am I doing wrong? /* Chapter 6: Telephone Keypad Programmer: Charlene Wood Date: April 8, 2012 Filename: TelephoneKeypad.java Purpose: This program …

Software Development java
Member Avatar for NormR1
0
419
Member Avatar for apanimesh061

I want to extract unique elements from a string. import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.StringTokenizer; /** * * @author Animesh Pandey */ public class Main { /** * @param args the command line arguments */ public static Set getUniqueTokens(String str, String separator) { StringTokenizer tokenizer = new StringTokenizer(str, …

Software Development java
Member Avatar for NormR1
0
158
Member Avatar for zachattack05

I don't work with ASPX or whatever it is now very much at all. I work with WinForms and DLLs most of the time, but I was asked by a client to make a portion of an application available online so that their clients can access certain information without calling …

Member Avatar for skatamatic
0
158
Member Avatar for nixufix

Hi, To start with I'm new to Java and this is my second project: to create a graphical TicTacToe game with MVC pattern. View and Control will be in the same class for this project. The goal is to learn about interfaces and to split your problems into seperate parts. …

Software Development java java-swing
0
374
Member Avatar for ckugblenu

We have learnt programming concepts with python and have now acquired the skill. What are the stuff we can go in and what areas are awesome to be in. Need help

Software Development python
Member Avatar for m1raEbrah1m
0
122
Member Avatar for phorce

Hello, I have 2 vectors, and I'm trying to search/scan the first vector for the second vector. Let's say I have this vector/Matrix: M1 = 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 1 M2 = 0 1 0 1 Then I will …

Software Development algorithm c++
Member Avatar for histrungalot
0
178
Member Avatar for riahc3

Hello Im doing this code for every form Ive doing (you have have seen it so I wont explain it) protected override void WndProc(ref Message m) { const int WM_MOVE = 0x0003; switch (m.Msg) { case WM_MOVE: return; default: base.WndProc(ref m); break; } } How can I do this so …

Software Development
Member Avatar for riahc3
0
90
Member Avatar for abhimanipal

Hello everybody, I am trying to teach my stl and after writing some basic programs I have hit a road block. I have an iterator which I am trying to pass to a function template Here is my function template template <class T> void display(typename vector<T>::iterator start, typename vector<T>::iterator end){ …

Software Development c++ ui-ux
Member Avatar for abhimanipal
0
178
Member Avatar for Tortura

Hi, it is jinxed. I don't find another solution. The code which doesn't work is very simple. While watching it with a breakpoint, IT WORKS! Otherwise it doesn't. I don't know why and it's driving me crazy. There are two comboboxes. The choosen item is the title of the x/y-axis …

Software Development
Member Avatar for Tortura
0
455

The End.