51,593 Topics

Member Avatar for
Member Avatar for globalizard

This is not a homework problem & my first post in 2+ years. I just got asked to do this in C# based on my asp & DB experience & I am tearing my hair out as they want in done in one day & 2 MS videos say to …

Member Avatar for sknake
0
207
Member Avatar for welcomepro

Hi to all, i have a little problem with my little application. I create a graphic object where i draw a series of text. I create it with [CODE=C++]Graphics gg(hdc)[/CODE] where hdc in the handle context of the screen ( BeginPaint ). Now i want to save this graphics object …

Member Avatar for welcomepro
0
115
Member Avatar for dag7399

1.write a program that asks the user to type 10 integers and writes the sum of these integers.Using [B]for[/B] loop.Can anybody help me with this question??

Member Avatar for siddhant3s
0
100
Member Avatar for gemgirl1972

Here is my whole problem can someone please please HELP Please 1. SPLIT THE PROGRAM IN 3 FILE NETWORK. H, NETWORK.CPP. CLIENTNET.CPP AS IN ADT. DONE 2. DEFINE A CLASS CALLED ADDRESS_T (done) with member for the four integers of an internet address and a fifth member in which to …

Member Avatar for gemgirl1972
0
124
Member Avatar for sonygamer

[CODE]#include <iostream> #include <cmath> using namespace std; int n; void main(){ cout<<"input the number of students: "; cin>>n; double *scores= new double[n]; cout<<"enter the scores of the students: "; for( int i=0; i<n; i++){ cin>>scores[i]; } double sigma,sigma2, mean, strDev; int ii; for (sigma=ii=0;ii<n;ii++){ sigma+=*scores; *scores++; mean= sigma / n; …

Member Avatar for sonygamer
0
136
Member Avatar for FBIRyan

I play this game called GunBound, and have a nice C++ script for it. But I need a function that can help me do the following: [CODE]int x=390; int y=450; for(int i = 0; i == 0; x++) { if(scanpixel(x, y) == YellowColor) i++; }[/CODE] I need to get the …

Member Avatar for nFectid
0
2K
Member Avatar for virtualmisc

Can anyone help with using c++ derived types in fortran? I got a pdf but it was of no use.

0
48
Member Avatar for Der_sed

The file "airports.csv" contains [U]12 pieces [/U]of info per line - separated by commas: [B]BIN,"Bamiyan","Bamiyan","Afghanistan","AF",34.800000,67.816667,701,"Afghanistan",\N,\N,1149361[/B] (there are 3 such lines for now) How do I modify my program to take the 1st, 3rd, 5th,6th,7th pieces of info per line and store them in an array- ill later use that array …

Member Avatar for KonkaNok
0
153
Member Avatar for gcardonav

Hi: I never set up a 2D array in the past and I am trying to do it now. I have a program that reads a 1 line text file and after reading it makes some calculations. After this I made some changes to my code trying to make a …

Member Avatar for VernonDozier
0
157
Member Avatar for ankit894u

in want to edit the code in such a way tht the user can enter upto 10 values maximum..need help pls ... [CODE] #include <iostream> #include <iomanip> using namespace std; struct node { int info; struct node* next; }*front,*rear; void enqueue(int elt); int dequeue(); void display(); void main() { int …

Member Avatar for shaynerossum
0
102
Member Avatar for itzaaron

I am new to c++ and I'm kinda struggling. I'm trying to write a program to guess a number that the user inputs. The program should guess a number then the user should be prompted if it is too high or too low. then the program should guess again, intill …

Member Avatar for mrnutty
0
1K
Member Avatar for somename

Hi there, i am trying to implement thread injection from my windows forms .NET project. Here is the code which works just fine from simple console app or Gtk+ gui application, but unfortunately not from .NET gui app. [CODE]#define NtCurrentThread() ((HANDLE) -2) #define NtCurrentProcess() ((HANDLE) -1) typedef DWORD (WINAPI *Rm_MessageBoxA)(HWND …

0
130
Member Avatar for dumrat

I am using multiple threads that are doing work. I need the threads to update an integer once they finish processing. [CODE] //Lock i_Flag++; //Unlock [/CODE] Then [CODE] if(i_Flag == i_ThreadCount) //Do something. [/CODE] My question is whether I need to use locks around i_Flag++ because it is a simple …

Member Avatar for jyh5
0
133
Member Avatar for patroclus

Hello, I'm trying to do something like this: - There're Base class and Derived classes. - Some Derived classes use multiple inheritance, from Base class and a pure virtual class called Interface. These classes are able of some functionality that ordinary Derived classes aren't. Why doesn't it work to cast …

Member Avatar for patroclus
0
86
Member Avatar for atch

Hi, I've got construction of namespaces like this: namespace one { namespace two { class SomeClass{...}; } } and when I try to use this class (without fully qualified name) in another file (also with nested namespaces) I'm getting errors. It doesn't even help if I place declaration of using …

Member Avatar for atch
0
86
Member Avatar for Thew

Hello, I'd like to make some application which will play videos or flash animations over the desktop. The only idea I have is to use DirectShow, make application window transparent and "always on top". But this is not exactly what I want. I'd like to have something playing on the …

0
165
Member Avatar for Vitriolics

I thought i had complex declarations nailed, as in i could tell you what a pointer to an array of functions that returned int and took doubles as arguments looked like i find this little horror: [CODE] /Return the IP address of a domain name DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*); …

Member Avatar for Vitriolics
0
211
Member Avatar for redreed

when i use random my settextstyle starts malfunctioning eg if i choose Gothic style i gives plain text if i make randomize a comment it works without bugs can anyone help me and also i heard void main is wrong and int main is correct why??

Member Avatar for redreed
0
106
Member Avatar for herms14

Guys...I badly need your help...I made a Hangman game and the requirement is it mus be a two player game so I need to make use of socket programming. The problem is I don't know what to do next..I do not know how to do the read and write the …

0
61
Member Avatar for vishalkhialani

Hi, I am using Borland c++ builder 2009 and I want to make a graphical application for my project. I need a book that can teach me that. I searched the net but I always found book on version 5 which is over 10 years old. Does anyone know any …

Member Avatar for shaynerossum
0
124
Member Avatar for shaynerossum

Hi, first of all I would like to thank you for taking the time to look at my problem. I'm trying to input to a multidimensional character array. The error occurs on the second array. I tried to understand the problem by varying my input, but it always occurs on …

Member Avatar for shaynerossum
0
338
Member Avatar for artorius

This is my problem...hopefully somebody can help me out with this. This is what I am supposed to be doing: Recursive Binary Search of 2-dimensional array: Load a 30x20 two-dimensional array of ints with values from the file “values.txt”. The file contains 900 numbers in order. Once the array is …

Member Avatar for artorius
0
2K
Member Avatar for shindu

so... i have been looking at this for a good 20 minutes and it makes no sense. when i compile this simple linked list implementation, it gves me this compile error. obj\Debug\Projects\LinkedList\LinkedList.o||In function `_ZN4nodeC1Ev':| obj\Debug\Projects\LinkedList\node.o:C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\locale_facets.tcc|2497|first defined here| ||=== Build finished: 1 errors, 0 warnings ===| any ideas what …

Member Avatar for shindu
0
52
Member Avatar for sfrider0

I'm pretty new to opengl but been using c++ for a while now. How can I display variables using this? I can display single characters by using [code] glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN,'0'); [/code] Why can I not use [code] int x = 0; glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN,x); [/code] Compiles but won't display anything.

Member Avatar for sfrider0
0
161
Member Avatar for NathanOliver

hi all. I'm not sure if its possible but can you call a different constructor inside a constructor of a object? ie can i have different constructors call a single constructor to set up the object [code=c++] class foo { public: foo(int) foo(double) //... }; foo::foo(int number) { this = …

Member Avatar for mrnutty
0
120
Member Avatar for evilguyme

is there a way to get the pixel color that is under the mouse? i heard of ways where i can turn it into bmp's a.. but even then i can't get the color of the pixel under mouse.. D: i just need a thing to make it get the …

Member Avatar for William Hemsworth
0
144
Member Avatar for argio

Access violation (Segmentation fault) raised in your program. I received this error when I ran my program after compiling it. I can't find the error in my code. main.cpp [CODE=c]/* Main.cpp source file. Main module. Copyright 2009 (GNU CC Licence) Madcow Deity Productions */ #include <cstdlib> #include <iostream> #include "System.hpp" …

Member Avatar for StuXYZ
0
113
Member Avatar for NinjaLink

Hi, I have two seperate programs below writing a short program for each. My programs run, but sometimes when I rearrange things in my program to try to get it to work, I will receive an error. I am tried to figure it out since last night, but I am …

Member Avatar for verence
0
3K
Member Avatar for aladar04

I can't reverse the inputted word... Here is my code... Please correct it... Sample Output: Type word(s): hello The reverse is: 'olleh' [CODE=c]#include <stdio.h> #include <conio.h> #include <iostream.h> #include <ctype.h> #include <stdlib.h> #include <string.h> char orig [300]; char rev [300]; int len; void original () { cout << "\n\n\tType word(s): …

Member Avatar for aladar04
0
156
Member Avatar for salman1354

Hello all, I have a question on using ArrayList class. Basically, I have a class called Customer as follows: class Customer { int ident; float value; float newValue; public: void setIdent( int ); int getIdent() const; void setValue( float ); float getValue() const; void setNewValue( float ); float getNewValue() const; …

0
68
Member Avatar for chandagondhali
Member Avatar for blackdove

I'm new to recursion and object oriented programming, but we have been assigned the knight's tour problem. This is where the knight's piece has to travel to every space on a chess board and land on each spot only once. I pretty much have my program done, except i'm having …

Member Avatar for RehabReda
0
2K
Member Avatar for jdam7459

I am having problems with traversing a parce tree. I need to do an in order traversal recursively. Here's the class's private section... [CODE] template <class data> class BinaryTree { private: struct tNode { data info; tNode *left; tNode *right; }; tNode *root; public: }; [/CODE] I'll be calling inOrderTraversal() …

Member Avatar for jdam7459
0
101
Member Avatar for Hawkpath

So heres the problem. My Grandmother needs to look up stocks, but she has trouble using "FoxFire" to look it up. I need a way where she can enter the name of the stock she wants, and the program enters it into a google search and searches for the stock. …

0
74
Member Avatar for adi.shoukat

Bellow is the piece of code that causes Segmentation Fault: (in Linux Segmentation Fault is usually due to illegal memory access) else if(intData==3) { FILE *fp; int ch; if((fp = fopen("file.txt","rb"))==NULL) { printf("Cannot open Source file.\n"); exit(1); } while((ch = (int)fgetc( fp )) != EOF) { printf("%s",(char*)ch); send(client, (char*)ch, 1,0); …

Member Avatar for Cosmin871
-1
90
Member Avatar for MrMoogles

Hey! Im new to this C++ stuff and the first major problem I run into is a two dimensional array. I have to declare the array and store data values from ANOTHER data file. I have some of the code written down. Please help and tell me what I'm doing …

Member Avatar for necrolin
0
762
Member Avatar for sachin.h

Hello Everyone, I am presently working on VC++ project, i have to create a new airgauge component using activex, [COLOR="Green"][B][U]can you please let me know if there is any better tool for creating a activex component, and i would also like to know if there are any good books on …

0
39
Member Avatar for gcardonav

Hi: I am trying to create a loop for a code. My loop is supposed to find all the combinations using the numbers 1 and 0 depending on the length of my string. For example if I set up my string to be 3 then the program should give me: …

Member Avatar for dkalita
0
186
Member Avatar for dkalita

Hi Can anyone help me in extracting all the tables and its contents that are present in a MS word document using c++ or C

Member Avatar for dkalita
-1
116
Member Avatar for aomran

this progran will simulate a process queue, giving time slices based on the priority. The process entries will be in a file, one per line.the data is the start time, priority level, total time to run and process name. when I run the program I got few problem 1. how …

Member Avatar for aomran
0
129
Member Avatar for marlinssmith

Hi, I am trying to write a program that finds the minimun and maximum number in an input set of numbers. I am using a loop to update the set as the program reads the cin. Example code: [CODE]min = max = -1 cout << "Enter termination value that will …

Member Avatar for mrnutty
0
115
Member Avatar for need

Program needs to read the students' first name,last name and test scores.Suppose that class has 20 students.Use an array of 20 components of type studentType. Output : last name followed by comma,space first name , score, revelant grade, and find the highest test score, print names of the students having …

Member Avatar for VernonDozier
1
98
Member Avatar for adi.shoukat

I want to write a Code in C which can create copy any given file (txt, bmp, jpg, pdf etc) what i've written so far is: int main(){ FILE *fp; char ch; FILE *fpW; if((fpW = fopen("file2.bmp","w"))==NULL) { printf("Cannot open Destination file.\n"); exit(1); } if((fp = fopen("file.bmp","r"))==NULL) { printf("Cannot open …

Member Avatar for Dave Sinkula
0
212
Member Avatar for jakesee

Hi all, How about this? In this example, what is the correct way to initialise Secret mission? [CODE]class Secret { private: int data; public: Secret(int _data) { data = _data; } }; class Mission { public: Secret mission; Mission(); { } };[/CODE] the only way i know of is using …

Member Avatar for Tom Gunn
0
148
Member Avatar for Mark198995

hello im writing a if statment for class and i cant get the program to terminate if the user goes to the else statement it still prints out the other cout's here is my program your supposed to enter in a id number then the crn of the class u …

Member Avatar for Tom Gunn
-1
110
Member Avatar for jakesee

Hi all, Maybe you can help me with this... in the code [CODE]float dot(const Vec3& v) const { return (x * v.x) + (y * v.y) + (z * v.z);}[/CODE] What is the purpose of the keyword const? Why in the case of [CODE]Vec3 operator=(const Vec3& v) const { x …

Member Avatar for jakesee
-1
95
Member Avatar for markrezak

[CODE]ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const …

Member Avatar for markrezak
0
273
Member Avatar for evilguyme

there is fstream in normal C++ that allows you to do file i/o but how do i do this in managed C++ in a forms application? i read about a config file but i dont quite get it.. thnx.

Member Avatar for evilguyme
0
235
Member Avatar for fuggles

Does anybody know of a good tutorial that could teach me how to use LINQ in C++, I will be using it to communicate my game to an online MySQL database and it will also be reading XML files.

Member Avatar for kvprajapati
0
54
Member Avatar for johndoe123

Can some help me with a random between two choices ? Something like: L = random(A, B); and in L to have A or B. Thx.

Member Avatar for Nick Evan
0
10K

The End.