49,757 Topics

Member Avatar for
Member Avatar for rfrapp

My assignment is to create the Game of Life. I know that it is very easy to find out how to do this online, but I don't want the answers fed to me. Here's what I have so far: [CODE] // Life.cpp : Defines the entry point for the console …

0
120
Member Avatar for travelingt93

So i have a program i am writing,and i have come to problem. I want to be able to pass a set of three strings into a function, which should then take them and add them to a Vector. All good so far, now is where my problem develops, how …

Member Avatar for Ab000dy_85
0
205
Member Avatar for kimbokasteniv

What I am trying to do is the following: [CODE] ReceiptBag zero("zero"); ReceiptBag one("one"); ReceiptBag bags[2]; bags = &zero; (bags+1) = &one;[/CODE] Of course that is not valid code. My goal is to be able to reference the same zero or one object by using its variable name or by …

Member Avatar for kimbokasteniv
0
291
Member Avatar for irre

hello, im totally new to this forum, but i already checked whether my ask is answered somewhere else already. i couldnt find anything... i used to work with dev-cpp and i have to work with the cnum.h library a lot. Since im a student i am able to get MS …

Member Avatar for Ancient Dragon
0
179
Member Avatar for meetjatin88

Hi Everyone, I am Actually trying to make a simple C++ game in which some random alphabets will fall down and when we press one of those random alphabets keys the aphabet should disappear. The problem that i am facing in making this code is that when i am using …

Member Avatar for deceptikon
0
267
Member Avatar for sharath_137

Hi! I am new to this forum and for c++ also. Can any one tell me the exact difference Createthread,beginthread,beginthreadex........ I have searched many links but not of much use...... Sharath.

Member Avatar for PrimePackster
0
60
Member Avatar for Abhineet.Ayan

Hi All, Why my QueueUserWorkItem is not at all working. My code is here: [CODE] typedef struct { PCHAR URL[MAX_URL] ; PCHAR DestinationPath ; }MAINDATA, *PMAINDATA ; int main(int argc, char * argv[]) { PMAINDATA pData ; BOOL bQuwi ; DWORD dwIndex ; PCHAR pURL ; pData = (PMAINDATA)malloc(sizeof(MAINDATA)) ; …

Member Avatar for DeanMSands3
0
638
Member Avatar for Jigs28
Member Avatar for radiat

Hi, can you have a quick look at the two for loops here. I've declared the int 'i' in the first for loop but in the second for loop it doesn't recognise it and i have to declare it again. Why is that? [CODE]for(int i=0; i<x; i++) { cout << …

Member Avatar for MandrewP
0
171
Member Avatar for C++ programmer

Hi guys. I am a bit confused among the following three functions. read() readAll() readLine() How do they work? I'll be really thankful to you all. Thanks alot for your precious time! Regards.

Member Avatar for deceptikon
0
707
Member Avatar for Susmita_Sikder

hi all, i am working now in code::blocks and dev c++,but in both the cases output is not coming in fullscreen.so,how to view output in fullscreen? thanks in advance

Member Avatar for harinath_2007
0
236
Member Avatar for pattmorter

I was studying for an exam and came across two questions that me and my friends didn't know the answer to. We are given the answer but we just can't figure out what the answer is what it is. First, why does this code give an error? [CODE]int z=5, q=2; …

Member Avatar for Ali_2101
0
193
Member Avatar for madhusushmi

I am looking for fastest API to read/write files. Can you please help? I have checked such discussions here. But I am not able to figure out from those discussions. Please help.

Member Avatar for MasterHacker110
0
2K
Member Avatar for CY0T3R

1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 How To Print The Above Pattern ?? (Using For-Loops Only)

Member Avatar for ravenous
0
194
Member Avatar for Adnan671

Here are program instructions. IT SAYS "segmentation fault" WHEN RAN. Specifications You must create a Ship class: The Ship class maintains the position data for each ship/vessel and its distance from another Ship. It has a default constructor, which sets all of the member data to zero, and a non-default …

Member Avatar for WaltP
0
174
Member Avatar for jigglymig

my problem is that when I try and run it it says 'SortedList' : cannot instantiate abstract class due to following members: 'bool BasicADT::isEmpty(void) const' : is abstract ...and... 'int BasicADT::getLength(void) const' : is abstract can someone please tell me what I am doing wrong with my getLength and isEmpty. …

Member Avatar for BlueSky2
0
124
Member Avatar for skannigan

Hi, i want to write from one file to another. i managed to get the file to write but not in the way i expected it too, there is more to the program but for now i just need to know how can i mirror one file... My input file …

Member Avatar for skannigan
0
165
Member Avatar for radiat

Just studying dynamic memory at the minute. I understand the idea of having dynamic memory for arrays so you can set the length of them within the running of the program. But what is the point of dynamic memory for a single type? If i set an 'int' up to …

Member Avatar for radiat
0
125
Member Avatar for phorce

Hello, I'm just wondering really.. I have a 2D matrix but I've defined it as a 1D matrix. So for example: [code] double *matrix = new double[N*M]; [/code] My question is, I'm going to be manipulating data very shortly and want to read this data in from a text file.. …

Member Avatar for WaltP
0
233
Member Avatar for stannum

Hello, I joined about 5 minutes back. I need to complete my computer project, which is a hangman game in c++, by today. Based on what my teacher taught me, I have created a code that runs like this- [CODE]#include<iostream.h>//These are the only header files taught. #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<string.h> …

Member Avatar for WaltP
0
288
Member Avatar for Zcool31

Hello everyone! I'm looking for a free (open source preferred) source code editor. Ideally it would be as light-weight as Notepad++, gedit, kate, mousepad, you see the pattern. However, the most important thing I'm looking for in this editor is flexible, dynamic, intelligent autocomplete (for c/c++). To be fair, Notepad++ …

Member Avatar for Zcool31
0
653
Member Avatar for tahsin.rahit

This code is giving me runtime error. Here, first I want to take a integer input which determine the number (n) of nodes in the graph. Then for n-1 time I want take two integer input which will give the adjacency information. [CODE] #include <set> #include <map> #include <list> #include …

Member Avatar for mike_2000_17
0
251
Member Avatar for Labdabeta

I have some code in C++ that uses an std::vector of std::strings to store an array of strings. I need to convert it into C. I thought that I would just create c versions of the functions I need (vector.back,vector.push_back,string.operator+=) but am getting lost in the double pointers. Can anybody …

Member Avatar for Ancient Dragon
0
177
Member Avatar for nell16

Pls help me on this. I really dont have an idea of solving this. Here's the question .. 1. Write a c++ program that generates the following series: 0 -1 4 -9 16 -25 36 -49 64 -81 100 and also this one 2. write a program that generates the …

Member Avatar for Ali_2101
0
254
Member Avatar for Labdabeta

I was wondering if there is any way using the mingw g++ compiler to make code that acts like this: [CODE]#define myLanguageBlock(X) doMyLanguageBlock(#X) void doMyLanguageBlock(const char* code){/*this executes the code as if it were in another language, I have already written this function*/} int main() { myLanguageBlock( this is all …

Member Avatar for Labdabeta
0
266
Member Avatar for Vasthor

hey guys, k, already 1 month I'm "leaving" my self-study on C++ for certain personal reason, I just learned the C++ two months before also, not much... I still can type in code and remember how most of the keyword works(that I learned), but I'm losing my ability to "think …

Member Avatar for thines01
0
141
Member Avatar for mweshk

Hi Gurus, I have an assignment am doing. The user should enter details of 5 students and return results on the screen.I have the code below and its return 1 error. Can someone kindly help me.With regards #include<iostream> #include <string> #include <sstream> using namespace std; int main () { typedef …

Member Avatar for DJSAN10
0
116
Member Avatar for Sunshine2011

I wrote a little program to read soma data from a *.txt file. The content of the file is "5 , 10, 15". The program shall identify the numbers, e.g. "5" and "10" and "15". This works until the last two numbers. Unfortunately the program doesn't read the last two …

Member Avatar for DJSAN10
0
104
Member Avatar for rohan121212

So here is what i have done I did the basics of c++ and was quite comfortable with them Now i wanted to start with the allegro gaming library so i downloaded the library and linked it with my compiler i compile a program and it compiles fine but when …

Member Avatar for DJSAN10
0
108
Member Avatar for butler273

So, as follows I have a basic while loop. It's working fine, however whenever I enter something other than a number or EoF, it goes through the loop one time after I'm wanting it to stop. Say I enter 5, then EoF, it enters an extra 5, so I have …

Member Avatar for subith86
0
151

The End.