51,593 Topics

Member Avatar for
Member Avatar for benny2010

When you make sprites does the image file type have to be .png or can it be .jpeg etc.?? cheers for helping me out

Member Avatar for alexchen
0
132
Member Avatar for johntodo

Hey guys, I'm wondering if anyone knows how to write a function that draws a hollow triangle pointing to the right made up of asterisks. The horizontal width of the triangle is passed as a parameter. The statement triangle(4); would display a triangle 4 stars wide: [CODE] * ** * …

Member Avatar for alexchen
0
142
Member Avatar for MasterGberry

I am having an issue using this new operator function that I learned. The program thinks that I am calling the operator=() instead of the operator+() so it is hitting an infinite loop. I marked the areas where there are issues, and i commented some of the newer things that …

Member Avatar for MasterGberry
0
147
Member Avatar for bretttmczk

the code following this is my project. The getInfo() function will not return the information, that is one problem i have having. also anyone have a suggestion for a search function for this? [ICODE]#include <iostream> #include <string> #include <iomanip> using namespace std; ///////////// //Prototypes ///////////// void menu(int&); void getInfo(string[], int[], …

Member Avatar for bretttmczk
0
235
Member Avatar for aria12

How to write a program that asks the users to enter two integers, obtains the numbers from user, then prints the larger number followed by the words "is larger", if the numbers are equal, print the message "these are equal". use only the single-selection form of the if statement.

Member Avatar for aria12
0
175
Member Avatar for johntodo

Does anyone know how to compare the first and second halves of a vector? I'm trying to write a function that returns true if the second half of a vector is identical to the first half of the vector. For example, if the vector contains { 3, 5, 2, 3, …

Member Avatar for frogboy77
0
132
Member Avatar for Basteon

Hi! I'm writing the mergesort algorithm, theoretically everything is fine in it but when the function gets to call itself the program crashes. I belive that I'm doing something worng when I pass the vector<int> as a parameter to the function. [B]procedure mergesort(T[1 .. n]) if n is small then …

Member Avatar for Basteon
0
1K
Member Avatar for Joey_Brown

Hello. Im interested in learning something about allocating memory for a 2d array. So I have a function that does this, and it goes something like this : [CODE]short **g2D(short **arr,short row,short col) { short i; arr=malloc(row*sizeof*arr); if(!arr) { printf("\nMemory unavailable"); exit(EXIT_FAILURE); } for(i=MIN;i<row;i++) { arr[i]=malloc(col*sizeof*arr); if(!arr) { printf("\nMemory unavailable"); …

Member Avatar for Trentacle
0
151
Member Avatar for moone009

I was wondering if anyone could tell me why my code is not displaying anything. My connection is correct because I did copy it from a program that already works properly. *Beginner Student* [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] …

Member Avatar for Mitja Bonca
0
111
Member Avatar for MacImg

how to load image into array without using Cximage()... actually i need to process iage from array/buffer in visual c++ 2005. what are the steps to be followed to achieve tat...

Member Avatar for myk45
0
85
Member Avatar for snipermann

Hi, I have a problem with reading the Ù’XML file,Can you help me . I need to extract the coordinates of points from the file and later use these points(U,V)to make a polygon . the U and V values are between two tags <contour> and <contour/> Thank you in advance

Member Avatar for ravenous
0
604
Member Avatar for alexchen

I am trying to get a random number without repeating. [CODE]int r,number; srand(time(NULL)); number=10; r=rand() % number+1;[/CODE]

Member Avatar for ravenous
0
18K
Member Avatar for Dingbats

Hi everyone, I'm writing a program for a teacher and friend of mine. It's a simple math-aid prog aimed at children up to 10yo. I was thinking that it would not only be a good idea that a child couldn't shut down the program without a password (obviously), but how …

Member Avatar for Dingbats
0
1K
Member Avatar for blah32

Hello, I am getting very strange behavior on an STL set::insert() . [CODE] ... //Rebuild the P_set P_set.clear();//destroy old P set (shallow only) assert( P_set.empty() ); for(int i = 0 ; i < N ; i++){ cout<<"addr="<< &(C_array[i])<<endl; pair<set<C*>::iterator,bool> p = P_set.insert( &(C_array[i]) ); assert( p.second && "FAILED TO INSERT" …

Member Avatar for arkoenig
0
113
Member Avatar for subrat.agasti

Hi, I have created a tsk scheduler using c++. i have also created a trigger for it. But when I am trying to save the trigger by calling pIPersistFile->Save(NULL, TRUE) method it is throwing an error. The error is: unable to establish existance of the account specified task scheduler How …

Member Avatar for subrat.agasti
0
201
Member Avatar for hworkr

i keep getting an error when i try to pass the array through function. Help? #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; void input(double carSpeed[6][7]); int main (void) { double carSpeed[6][7]; input(carSpeed[][]); return 0; } void input(double carSpeed[][7]) { ifstream FileName; FileName.open("noise.txt"); for(int x=0; x<6; x++) …

Member Avatar for Nandomo
0
122
Member Avatar for Transcendent

[COLOR="Red"]I'm calling sortprint but how can I Implement it? I also want to implement a the sort function. [/COLOR] [COLOR="Green"] I highlighted some of the things in red.[/COLOR] [CODE]#include <iostream> #include <vector> using namespace std; void sortPrint( const vector<int>& v); int main() { vector<int> v; vector<int>::iterator iter; int num; cout …

Member Avatar for Transcendent
0
105
Member Avatar for stevetaylor15

Does anyone know how to add a new button to the 'New E-Mail' Window of Outlook 2010?! - Preferably on the 'Message' ribbon. I had a lok and it's pretty confusing with limited documentation. THanks!

Member Avatar for Tekmaven
0
92
Member Avatar for hq1

I will arrange my output in well-alligned columns, but I don't think I should use 3D char arrays since my teacher just wants us to stick with what we've learned so far. Check out my code. I'm happy about it, but I just can't get the alignment right. [CODE]//File: lab9.cpp …

Member Avatar for Dingbats
0
629
Member Avatar for sadsdw

Hello friends, I'm looking for an short example to read a text file and get lines splitting in 3 vectors. I don't know how I'll do this ... E.G: 100 NAME1 30 150 NAME2 40 200 NAME3 50 -> vectorId[0] = 100 vectorName[0] = NAME1 vectorAge[0] = 30 Can you …

Member Avatar for sadsdw
0
190
Member Avatar for Isbella

Hi everyone....I just need some help...I m beginner in C++ Language. I have to submit a small project. In that project I have to make any small software, application or game. Please help me what should I do???

Member Avatar for StuXYZ
0
278
Member Avatar for LampOil

where would be a good place to learn how to use mfc40.dll & mfc42.dll in Gui C/C++ the things i need to learn about are activex controls to load them useing the ProgID ,ClsID & file name the type of apps i plan to make are to be compiled in …

Member Avatar for SgtMe
0
28
Member Avatar for sharifyboy7

I am working on this linked queue class program and it runs without any compiler errors but there is a break point in my dequeue function. It is pointing towards: "item = qFront-> info;" line 83 in the dequeue function and I am not sure how to fix this error. …

Member Avatar for Clinton Portis
0
150
Member Avatar for David_Omid

Hey guys, sorry if this is a silly question but I have a piece of code which contains something like this: [CODE] private: void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button3_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button4_Click( Object^ …

Member Avatar for David_Omid
0
152
Member Avatar for packetpirate

This is for the numerous people I see constantly asking how to "pause" the console after their code runs. The explanation for how the code works is within the snippet in comments. Basically, the "cin.clear();" function will clear the input stream, getting rid of any newline characters that would have …

Member Avatar for MosaicFuneral
-1
2K
Member Avatar for mohd22

Write a function called nRandomNumbers( ) to perform the following tasks: 1. Generate N random integers between -250 and 250 (inclusive) and save them in a file called number.txt, (Use the function srand()). 2. Print all the generated integers. 3. Compute and return the average of all the negative integers, …

Member Avatar for alexchen
0
216
Member Avatar for alexchen

How can I read a random line from text file. After I get the word I need to count the letters. [CODE]bool word(char *Filename){ ifstream file; file.open(Filename); //add code. return true; }[/CODE]

Member Avatar for alexchen
0
1K
Member Avatar for cplus++

Hi, I am coding an application that requires the privileges of the logged in user. I have checked the application to run with administrator privileges and upon executing it asks me if I want to run this application with admin privileges. Despite granting access when my code executes it doesn’t …

Member Avatar for cplus++
0
246
Member Avatar for Bschober

I've been working on a side project of Tic Tac Toe, it works fine, but I'd like to change the winner function to be dynamic and work for any size board. For example, say I want a 4x3 or a 10x10 board how could I make the one function work …

Member Avatar for Bschober
0
352
Member Avatar for oosb

my default in my switch case statement doesn't seem to work, so if i type in a non integer, it will exit, and follow case 0. there are no signs of the default working.. how to solve, i've tried alot! :( bool isFinished = false; while(!isFinished) { ....... .... .... …

Member Avatar for daviddoria
0
89
Member Avatar for iCode@Night

Hi all. I need to code an offline crawler that acts like a web crawler on a set of given html pages. I know how to read the a=href tag and output those links to the screen. My plan is to modify my code to add more functionality. Instead of …

Member Avatar for ravenous
0
139
Member Avatar for Syrne

Hello! (Spelled polymorphism wrong in title, I know... it's late!) Now, I understand the concepts of both just fine, but implementing them is where I really run into trouble; this is especially when I'm given a specific problem to solve by using them (i.e. my current assignment). Okay so here's …

Member Avatar for Syrne
0
250
Member Avatar for Hayzam_#include

Hi i need a good vector video tutorial please give the link in the discription

Member Avatar for Hayzam_#include
0
82
Member Avatar for groedius

I have an C++ games project due in about 2 weeks i have no former knowledge of C++ and feel like ive leapt in at the deep end our lecturer just kinda put it on us and told us to do it as an self research task and gave us …

Member Avatar for groedius
0
149
Member Avatar for skorm909

I'm making a shop for my game, I opened a Fresh thing of code for this so this is the only code I'm running, I just want to get this to work before I put it into my actual game. anyway what the problem is, is that no matter what …

Member Avatar for Sodabread
0
167
Member Avatar for mayanktalwar

i dont have any experince of software making...i know c ,c++ and web designing lanuguages....how should i start it..to do what i have asked...i have to decide a project

Member Avatar for ravenous
0
153
Member Avatar for DAlexNagy

This is a request for some 'best practices' comments from experienced OOP practitioners. I have been in IT from the days of punched cards and have had considerable experience with legacy languages like 370 ASM, SAS, and REXX. For fun, I've taken a college class in C++ and am now …

Member Avatar for DAlexNagy
0
169
Member Avatar for MacImg

im creating dll in vs 2005 .i found the same two errors i tried to solve as u said in the previous discussion forum with same topic,, but there is only one main in my project too.. could u help me out ... --- mfcs80ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already …

0
72
Member Avatar for sha11e

If I write 1 letter, I get the error message once. If I write 3 letters, I get the error message three times...... How can I fix this :S? [CODE] #include <iostream> #include <stdio.h> #include <math.h> #include <cmath> #include <stdlib.h> using namespace std; int main() { //vars char user_numberr; //int …

Member Avatar for jonsca
0
111
Member Avatar for sam33

here is the code ....plz help [code] IplImage *cur_frame = NULL; IplImage* background=NULL; IplImage*temp1=NULL; //IplImage*difference=NULL; cur_frame=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1); background=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); temp1=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); cur_frame=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\frame.jpg",CV_LOAD_IMAGE_COLOR); background=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\background.jpg", CV_LOAD_IMAGE_COLOR); cvRunningAvg(cur_frame,background,0.005,NULL); cvConvertScale(background,cur_frame,1,0); cvNamedWindow("back",CV_WINDOW_AUTOSIZE); cvShowImage("back",background);[/code]

Member Avatar for jonsca
0
310
Member Avatar for BrianTurkish

[CODE]// 1. Find the frequencies of individual letters in a sample // text file. // 2. Display this information both numerically and graphically. // a) In A..Z sequence // b) In decreasing frequency sequence // Programming concepts and C++ Language elements used // a) vector of structs, b) sorting #include …

Member Avatar for ravenous
0
155
Member Avatar for hueynee84

I am very new in c++ programming and in self-learning process. I involve in a research on image processing and installed Borland C++ Builder 6 with LMD tools, SDL and Borland c++ compiler 5.5, like the rest of the researchers in our cluster. The project is to develop GUI for …

0
46
Member Avatar for kshaaban

Incase you wanted further information, I used a tutorial from here to try this method of lens correction out from here: [url]http://www.aishack.in/2010/07/calibrating-undistorting-with-opencv-in-c-oh-yeah/[/url] I seem to be getting this error when trying to build the code below. (it is all self contained so if you have openCV installed and linked etc …

Member Avatar for wmaiouiru
0
241
Member Avatar for keeda

Hi, I am trying to come up with an algorithm to generate different permutations possible for a string. like "String" -> "String" , "Strgni" etc.. I know this is a common question, but google did not help me much. I am looking for algorithms and data structures to generate different …

Member Avatar for jonsca
0
79
Member Avatar for TSaunders84

this is a quick sort function that receives a singly linked list and a function pointer that is called before it has to be done recursive function. this is what i have so far [CODE]template <typename T> void quicksort(SinglyLinkedList<T> & A, bool (* before)(T &, T &)) { typename SinglyLinkedList<T>::iterator …

Member Avatar for griswolf
0
114
Member Avatar for neemo6

This is for a final project that in which the project had to contain at least, 1 loop, a class, an array, and file. Im just looking for ideas has to how i could in corporate an array and a file. One idea i had for the array was to …

Member Avatar for jonsca
0
626
Member Avatar for gizmo7008

I'm trying to search a text file for any email addresses. I'm trying to get it to print the line that every @ sign appears in. However, it is only printing the @ sign instead of the whole line. And I don't understand why. [CODE] //gathering emails string Emails; int …

Member Avatar for jonsca
0
85
Member Avatar for spring10

Hi, Trying to write some C code for an assignment using a PIC16F84 for a digital watch/alarm. RA0 to increment time RA1 to decrement time RA2 set-move to next digit RB7 set time/alarm RB6 enable/disable alarm 1. press RB7 once to set time. 2. press RA0 or RA1 repeatedly until …

Member Avatar for MudasirAli
0
368
Member Avatar for aquario20

this is my homework , and i have some code but please can you help me to fixed my homework please.... The purpose of this exercise is to give you practice with abstract data types, namely structrures and arrays of structures. Write a program that simulates a soft drink machine. …

Member Avatar for ravenous
0
103
Member Avatar for qvyhnl

compute recursively the number of times that sub appears in the string, without the sub strings overlapping. str_count("catcowcat", "cat") returns 2 str_count("catcowcat", "cow") returns 1 str_count("catcowcat", "dog") returns 0 please give me some idea to solve this problem [CODE]int str_count(string str, string sub) { int len = str.length(); int s_len …

Member Avatar for Clinton Portis
0
103

The End.