49,766 Topics

Member Avatar for
Member Avatar for nschessnerd

Hey, Ive been working on a program for a while, and once in a while it will crash for an unknown reason. I checked the error log and it says exception 0xc0000005 which means i'm writing somewhere i shouldn't. What are some common causes of this? Also is there anyway …

Member Avatar for MastAvalons
0
217
Member Avatar for mariel_1013

Hello, Can anyone help me? I am new to programming. I need to create a program that tracks sales. The store owner wants to keep track of monthly sales. 1. Ask the user for the monthly income of the store (one question per month) keep the numbers input 0-50. Store …

Member Avatar for mariel_1013
0
313
Member Avatar for mrcerimo

**Hello there! I have been learning c++ for now 6 months and when i started my goal was to use it whit openg or something similliar I made long, long list and its here:** *I learned this stuff from....YOUTUBE! from user called antirtfm and thenewboston and heres the things that …

Member Avatar for mrcerimo
0
400
Member Avatar for nikhil patwari

Hi Everyone, I had written the source code in .C file and compile it without any errors but when i run that program it gives me linker error. i.e. Linker Error : Undefined Symbol _getpid in module filename.c I am using TURBO C++ version 3.0. Pls give me the solution …

Member Avatar for Moschops
0
14
Member Avatar for Arob3

Ok im debugging this program for school and I have 3/4 parts done but im stuck on this part. class Outfit { private: Dress dress; Shoes shoes; double price; public: static const double DISCOUNT; Outfit(string, int, string, string, int, string); void displayOutfit(); }; const double Outfit::DISCOUNT = 0.20; Outfit::Outfit(string m1, …

Member Avatar for dark_sider_1
0
209
Member Avatar for Labdabeta

I currently have the following code for a sprite struct (c-style for use in DLL): typedef struct LABglSpriteTAG { unsigned int glTexture; int w; int h; LABglColour *data; bool compiled; }*LABglSpriteHANDLE; And the following function: void LABglSpriteConvolute(LABglSpriteHANDLE spr, int w, int h, int *kernel) { size_t dim=spr->w*spr->h; LABglColour *out=new LABglColour[dim]; …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Mindless Z

Hey All, I've got an assignment due tonight involving semaphores, and I can't seem to figure it out. I'm given the following program: #include "stdafx.h" using namespace System; using namespace System::Threading; ref class PrintTasks { public: static bool runFlag = true; public: void PrintDigit(Object^ name) { while (runFlag) { Console::WriteLine((String^)name); …

0
68
Member Avatar for adohertyd

I am working on a struct program and it is working perfectly except for one thing. 2 of my struct elements are arrays and I can't populate them. I have tried a number of different things but I keep getting compiler errors. What is the correct way to pass an …

Member Avatar for histrungalot
0
275
Member Avatar for amberrrrrNJ

Hey everyone. I really need some help with my code for class. Here is the prompt : Write a program to manage a dictionary. The dictionary should be stored on a text file named diction.txt and consist of an alphabatized list of words, one per line. When a user enters …

Member Avatar for amberrrrrNJ
0
203
Member Avatar for wildplace

so i fork n process: for(i=0; i<numOfProcess; i++) pid == fork(); if(pid == -1) //error handling if(pid == 0){ //child, do something exit(0); } else{ //parent //i want to wait till all children are done before continue..how? //i tried wait(NULL), and waitpid(pid, NULL, 0) //but both wont work..? //........... //something …

Member Avatar for histrungalot
0
10K
Member Avatar for MastrLuigi

Hey guys. I'm new to this site. I just wanted someone to look over the code I have so far for a hash table that operates on linear probing. I don't have anyone to really check these things for me as my professor is always busy. Can anyone tell me …

Member Avatar for MastrLuigi
0
267
Member Avatar for wildplace

i created some segement of shared memory using <sys/shm.h> <-- im not sure what this thing called.. shared memory? seems shared memory doesnt like dynamic allocation and vectors what are some apporaches i could create a 2D array like structure in shared memory?

Member Avatar for wildplace
0
172
Member Avatar for f4fjks

hey all! i created a keylogger of my own in visual c++ 2010, and included iostream, windows.h winUser.h the problem m facing is that it runs only when visual c++ is open. as soon as i try to close it, it pops a message to stop debugging and if i …

Member Avatar for f4fjks
0
949
Member Avatar for FelineHazard

Hi all, I encountered some weird act from the return(); function. I'm doing some book exercise in recursions: write a recursive function that makes a summation 1 + 1/2 + 1/3 + 1/4 + ... + 1/n. Rather basic. So I wrote this: float summation(int n) { if (n == …

Member Avatar for FelineHazard
0
194
Member Avatar for deanus

Hi, I've been using C++ for quite a while but recently I discovered this peculiar behaviour. The following code works as expected: #define TWO 2; int nVal = 3 + TWO; cout<<nVal<<endl; // output is 5 ...if on the other hand I place the literal integer after the '+' in …

Member Avatar for deanus
0
106
Member Avatar for geekdevil

Me and my freinds are heading towards a C++ Game Project of Snake-Game in which a Snake is to be made of 6 "*"s and it is controlled with keybord.... We had progressed till here and weare finding difficulty in handaling more than 1 stars plz help #include<iostream.h> #include<conio.h> void …

Member Avatar for Labdabeta
0
320
Member Avatar for phorce

Hello, I need to store the cooridants of a vector, for example: If the vector was: 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 0 0 0 0 0 And this vector is then split into blocks, I need to store the the …

Member Avatar for Labdabeta
0
141
Member Avatar for Labdabeta

I am wondering how to perform a 2D image blit with openGL. I used to use SDL and it was easy, but with opengl I end up making a rectangle with texture coords that is sunk a little into the screen. Is there any way to perform a 'real' blit? …

Member Avatar for Labdabeta
0
526
Member Avatar for capton
Member Avatar for capton
0
2K
Member Avatar for cryonize

Hello again, I am asked by my professor to create a program using selection sort in a linked list. Selection sort with sorting only the data is pretty easy, but I'm having a hard time because he made us sort the nodes themselves. Can anyone help by giving atleast the …

Member Avatar for mike_2000_17
0
10K
Member Avatar for murnesty

The local pointer will be remove after i go out from that scope? or will remain? Example: int glb1 = 2; int main () { int var1 = 0; fnCall1(); fnCall2(); //at here } void fnCall1 () { int tmp1; tmp1 = 10000; } void fnCall2 () { int *ptr1; …

Member Avatar for rubberman
0
132
Member Avatar for nekoleon64

My name is Leon Norwood Jr....hmm.. Anyway I have this program that I'm nearly done with I have to do one of those ICAO(International Civil Aviation Organization program, in fact it's the same program that I did myself several weeks ago, I now have to do it again with arrays …

Member Avatar for ChrisPadgham
0
644
Member Avatar for pattmorter

I am working on a practice exam right now and I came across a write-your-own code problem that I can't figure out. The question is: > Modify your first function. In addition to returning the greatest value by pass-by-value, you should also sent a true/false value back to main() if …

Member Avatar for pattmorter
0
217
Member Avatar for MrEARTHSHAcKER

Hi, I have recently finished first game in C++ which has huge code which will be fixed in future who knows how many times. It is really not practical to publish entire .exe launcher as fix, but I heard that it isn't case with DLL files. I could simply create …

Member Avatar for Ancient Dragon
0
170
Member Avatar for Bennigan88

Hey guys, my first post so forgive me if I balls up posting this code. Anyway, this is my program for calculating the indefinite integral of any programmer-defined function given two limits of integration. Any thoughts or comments would be appreciated! #include <iostream> #include <cstdlib> #include <ctime> #include <cmath> using …

0
52
Member Avatar for nuclear

Straight to the point, I am using SOIL (http://www.lonesock.net/soil.html) library to upload images into OpenGl. Loading textures works fine but there is this thing i dont fully comprehend. Lets say I load an image into OpenGL via SOIL and I want to reuse the same image over few other textures …

Member Avatar for nuclear
0
2K
Member Avatar for tornado2232

how to find the roots of any given polynomial using newton raphson method if any one have the code plz share it

Member Avatar for ravenous
0
190
Member Avatar for Chuckleluck

Could someone direct me to an open-source, 2D sidescrolling game developed in C++? (I'd prefer a Mario-style sidescroller, but almost any would do.) I'd like to look at the source code to see some examples of a working sidescroller collision detection system, and a jump algorithm. Thank you for your …

Member Avatar for Serapth
0
205
Member Avatar for hwoarang69

hi iam really interested in c++ game programming but i have have no idea how to get started and i have never used c++. i am using C and Java for about 2 years now. could any one let me know where can i learn graphic programming, game programming, where …

Member Avatar for Serapth
0
186
Member Avatar for enkitosh

Hi. I'm making a shooting game and since my code was getting a bit messy and big I decided to divide it into couple of classes and files. I'm confused of how to correctly split these files and classes up though. As I imagine it without really knowing if that …

Member Avatar for Serapth
0
362

The End.