49,760 Topics

Member Avatar for
Member Avatar for Despairy

Hi, lets say i have [CODE]class Players{ public: vector <strings> info };[/CODE] and class that inherits from it [CODE]class son:public Players{ };[/CODE] now in the main function i make 2 of those so now i have 2 vectors in memory that vector holds the same data for all of the …

Member Avatar for Ancient Dragon
0
255
Member Avatar for SoulMazer

Hi, I'm a beginner to C++ and am having some trouble with my list. I first define a struct named "bullet' like so: [code=c++]struct bullet { bool alive; bullet() alive = true; };[/code] Then, I create a list of objects of type "bullet": [icode]list<bullet> bullet_list;[/icode] In my program, I frequently …

Member Avatar for saravmittar
0
196
Member Avatar for jonnyboy12

Hello all i am just getting into using windows forms. I have been looking around on the internet for like a day now and cant seem to find any good code on how to add a table with columns , rows and labels on the top of the columns. I …

Member Avatar for thines01
0
90
Member Avatar for Clinton Portis

Fun game for the raging compulsive alchoholic gambler, such as myself. Although the game may vary among casinos, the basic premise is the user picks 10 numbers out of 80. The computer will randomly draw 20 numbers out of 80. If you matched with any of the computer picks, you …

Member Avatar for PrimePackster
0
1K
Member Avatar for jman2011

I am new in programming. I have this problem in coding. i somehow have the idea but i could not simply do it in codes. can anyone add to complete my program. The problem is I enter 10 numbers and i need to sort them ascendingly. #include<iostream> using namespace std; …

Member Avatar for jman2011
0
86
Member Avatar for StickyTape

I use Visual Studio 2010 Ultimate. After fixing one of my problems, I ran into another. I have 2 files in my project named, let's say, A and B. The problem is when I try to run the code from B, VS outputs code from A. Any ideas on how …

Member Avatar for Crosby Grant
0
1K
Member Avatar for Odanaga

Hello, everyone! I made an account on this website because I'm having trouble with a particular program. I'm supposed to be writing a Polynomial class with a linked list to hold coefficients and an integer for the degree. I keep getting a fatal error LNK1561, though, and I don't know …

Member Avatar for Odanaga
0
381
Member Avatar for freedomflyer

I think I have the logic mostly down for this part of the program. However, I am using an implementation of a header file, and in [B]BST::Insert[/B] I am handed a [B]const std::string &v[/B]. For all I know, it is doing the right job passing it off to [B]InserRecursive[/B], but …

Member Avatar for freedomflyer
0
136
Member Avatar for Forswear

Hey there,I'm looking for assistance with my simple code here. Why do my integers ( x,v,z,d,e,f,g,h ) suddenly change when the program reaches the " printf("The decimal value is... " part? Is there something I'm missing? [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int Binary[7],x,v,z,d,e,f,g,h; Binary[0]=x; Binary[1]=v; …

Member Avatar for <ccg>
0
486
Member Avatar for lbgladson

I have an assignment to get the area and perimeter of a rectangle. I have to set the width and length to 1 initially and use set and get functions. I have the following code but am not getting the correct answers for area and perimeter. Any suggestions? Rectangle.h [code] …

Member Avatar for Moschops
0
1K
Member Avatar for swissknife007

[CODE] #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<iostream.h> struct pro { int no; int btime; int atime; int stime; int etime; int wtime; int ttime; int rtime; }proc[100],junk; void sort(int n) { pro temp; for(int i=0;i<n;i++) for(int j=0;j<n;j++) { if(proc[j].atime>proc[j+1].atime) { temp=proc[j]; proc[j]=proc[j+1]; proc[j+1]=temp; } } } pro min(int n,int & t) { …

Member Avatar for swissknife007
0
3K
Member Avatar for avenger123321

[QUOTE]I was given this project as a part of my school assignment, please note that I have very limited knowledge of the language, and my teacher won't allow using anything other than what is used in the following code (Crappy 12th grade curriculum:yawn:)... Here is my complete code, its in …

Member Avatar for avenger123321
0
354
Member Avatar for hmartinez

Hello, I have a strange problem. I am trying to use the tesseract library in my own project. First, I have used it in a new project, just to test it, and everything has gone fine. After that, I have integrated in a bigger project in the same way as …

Member Avatar for hmartinez
0
500
Member Avatar for ahoysailor

Hi, I'm having a problem with using the streamWriter to write to a unicode file. Code as follows: [CODE] for(int i = 1; i < 1018; ++i) { std::wostringstream integer; integer << L"IDS_STRING" << i << L"\t"; wstring thisString = integer.str(); thisString = thisString + L"\"Spare String\""; wchar_t* SpareString = …

Member Avatar for thines01
0
225
Member Avatar for anuj.juthani

i am a beginner in visual c++ and using visual studio 2010, i have came across a scenario where i want a dialog screen to appear in a full screen mode like our youtube video screen. i was successful to make the dialog box appear on the full screen , …

0
76
Member Avatar for Alexis913

I am trying to launch a process using CreateProcess() I have to modify the Path environment variable as well as add some environment variables of my own. What I am doing is I get the parent's environment block using GetEnvironmentStrings(). I basically copy the parent env block and only modify …

Member Avatar for Alexis913
0
4K
Member Avatar for triumphost

I read a LOT of tutorials on bitmaps. I learned that RGBQuad is for 32 bit bitmaps and RGBTripple is for 24 bit bitmaps.. I'm planning on getting pixel information from a bitmap that can be of 3 types. 24bit, 32bit, 32bit with alpha (Transparent). Thing is, I don't know …

Member Avatar for triumphost
0
199
Member Avatar for kukuruku

Hi ,I am trying to implement merge sort with list and I have this error in this code [COLOR="Red"]invalid use of void expression[/COLOR] list<string>::iterator LIST_ITER; sz is the size of the list beg beginning of the list end end of the list Thank you in advance [CODE]void merge_sort(LIST_ITER beg, LIST_ITER …

Member Avatar for mrnutty
0
87
Member Avatar for firebird102085

HI everyone, like my last post stated I am new to programming so be patient with me. I am having a hell of a time writing this program and I was hoping some of you might be able to give me some quick pointers on the structure I should use. …

Member Avatar for KasmIR
0
131
Member Avatar for arold10

I am writing a program about giving change. But I am having issues with getting remainders for decimal numbers. For instance I am giving $46.63 change I want to know how many $20.00 bills it has, I would have to divide it by 20. 46.63 / 20 = 2.3315 My …

Member Avatar for Ancient Dragon
0
119
Member Avatar for sodha125

Write a program which asks the user to write some text before analysing it to see how many occurrences of each vowel appears in that text, you should store the number of occurrences of each vowel in an array of size 5. (Hint: use qin for this, with the ‘Return’ …

Member Avatar for KasmIR
0
197
Member Avatar for Aniqa Shaikh

Hay guys, i wanted to get the code for a very large factorial but i was unable to do so. Now, i had to work and develop the code myself, which i did. This code calculates factorial of numbers uptil 14000. . i havent tried more. But i guarantee this …

Member Avatar for sameershah21
1
656
Member Avatar for mvmalderen

I've written a program to add two hexadecimal numbers ... Njoy ! tux4life

Member Avatar for alebuddy
0
1K
Member Avatar for sasho648

I want to make a mouse controlled camera the problem is that i want to rotate over the space not the current object but I don't know how to calculate the changes on view transformation. Here is the code example: [CODE] D3DXMatrixLookAtLH(&matView, &D3DXVECTOR3 (0.0f, 0.0f, CurCamRot.z), // the camera position …

0
315
Member Avatar for MrEARTHSHAcKER

Hi, I have an app created in Borland Builder 6, on Win 7, but I tested it on Win XP, and font's size changed, some forms resized... This guy has explained the problem >> [url]http://www.tek-tips.com/viewthread.cfm?qid=1668509[/url] Anyone experienced with this?

0
45
Member Avatar for bobanderson93

something is wrong with my dequeue function. When i try to output the value that's about to get deleted i get garbage on the console window. the enqueue function works fine. [CODE]class Queue { private: int value; Queue *next; public: void dequeue(); void enqueue (int num); }; Queue *head=NULL; void …

Member Avatar for Karkalash
0
177
Member Avatar for vyrte

hello everyone! i'm writing a program using linux environment and i'm curious about the use of waitpid().i have searched the command on google but i'm not sure i understood the return values of the command. for example i want to use it as follows: [CODE]if(waitpid(-1,&status,WNOHANG )>0) sum++; [/CODE] where sum …

Member Avatar for Ancient Dragon
0
127
Member Avatar for Irina77

I am trying to build a console project using Microsoft Visual C++ 2008 Express. I included a static third-party library (no source code available) by adding the name to the Additional Dependencies (in Project Properties\Linker\Input). Additionally, I added the path of the folder where the ThirdPartyLib.lib is to the Tools\ProjectsAndSolutions\Directories …

Member Avatar for Irina77
0
608
Member Avatar for Al Borland

Hi all just wanted to take a moment to introduce myself. I stumbled upon these forums while looking up more information on programming in C++. It looked very useful and it would be nice to have a forum I can ask questions on and post problems I"m having with coding. …

Member Avatar for PrimePackster
0
187
Member Avatar for stereomatching

I am trying to write some simple programs related to network and I boost::asio as a tool to start with Below is one of the example from a blog(I alter it a little bit) [code] void OnConnect(const boost::system::error_code & ec) {} void asio_7b() { asio::io_service io_service; asio::ip::tcp::socket sock(std::ref(io_service) ); try …

Member Avatar for stereomatching
0
156

The End.