49,761 Topics

Member Avatar for
Member Avatar for serkan sendur

when i run my application i got "Memory fault(coredump)" run-time error, what might be the possible cause for this? Thanks

Member Avatar for serkan sendur
0
102
Member Avatar for teddybouch

I am trying to sort a linked list, and not being terribly familiar with sorting algorithms, I just found a merge sort on Wikipedia and decided to go with it. Hence, I apologize if I'm missing something obvious. Based on the printout statements that I inserted into the code, it …

0
85
Member Avatar for Nyaato

Hello, I'm currently programming a C++ Snake game and I'm stuck at a particular part of the program. This particular part had me wondering for sometime now, and I've got absolutely no idea how to work it out. I want to implement a collision detection between two snakes that would …

Member Avatar for Murtan
0
152
Member Avatar for Nicklorion

Hi, Could some one point me in the right direction. I'm trying to get a value thats in a file between tags. for instance: I'm reading an array out of a file per line example: [code=C++] myArray[0] = "<FILE_NAME>Testfile.dat</FILE_NAME>"; [/code] What i'm trying to do is to read every field …

Member Avatar for Nicklorion
0
144
Member Avatar for clutchkiller

Im not sure if this is how the process would work, but if i am to say create a header file named myheader and in that header wrote [code=c++] #define functionName { code... } [/code] and then wrote a .cpp file and in the source code I would #include <myheader> …

Member Avatar for Rashakil Fol
0
161
Member Avatar for gamerprog

I'm programming this RPG, and I can't get past the first battle. I can't figure out how to get the computer to break the loop when then enemy's health (enhp) is less than 1. I tried using an if statement, but then it didn't loop at all. Could you guys …

Member Avatar for Murtan
0
2K
Member Avatar for LucyB
Member Avatar for matrimforever

What do I need to gather all lines of numbers say 88 on one line, and 92 on the second and so on? I have: ifstream theFile("grades.txt"); theFile >> sc1 >> sc2 >> sc3;// this gives me each number, but I need to be able to read them all then …

Member Avatar for Comatose
0
1K
Member Avatar for Teethous

Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. …

Member Avatar for Teethous
0
314
Member Avatar for oblivion4

Hi, I'm working on learning OpenGL using Visual Studio 2005 and I ran into these errors: [code]1>circle.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) 1>circle.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "long __stdcall WndProc(struct HWND__ …

Member Avatar for oblivion4
0
156
Member Avatar for Dr_Mithak

this is the quick sort and I know that it has O(n^2) time complexity at worst case (when data is already sorted) put how I count the operation that makes this time complexity i.e which part of the code will mostly excute when elements are already sotrted so that when …

Member Avatar for Arlekean
0
362
Member Avatar for clutchkiller

I have declared kbSize as an integer earlier in my code as a global variable, so there's no confusion from replies with it being local, and have a formula that process's its value, but for some reason when my program hits this if statement, it always calls timeStamp(); even when …

Member Avatar for clutchkiller
0
67
Member Avatar for RayvenHawk

I'm working on an assignment that I need to move a sphere around the screen with the keyboard arrows. I got the movements working and all that. But I'm drawing a blank on an "if" statement to prevent the image from going off the screen when the edges are reached. …

Member Avatar for RayvenHawk
0
106
Member Avatar for andyv

Hi all. I am trying figure out why the compiler is giving me this error message: error LNK2001: unresolved external symbol "double __cdecl calcWindChill(double,double)" (?calcWindChill@@YANNN@Z) HomeWork3.obj I've declared, defined , and called the calcWindChill() function. I've obtained the values needed to feed into the function. They're not getting put into …

Member Avatar for Ancient Dragon
0
215
Member Avatar for StainlessSteelR

I have to create a program that reads data from a file about census info specifically a last name and the frequency of which last name appeared in census. I have to call a function to read in the data, calls a function to display the data, do a binary …

Member Avatar for StuXYZ
0
801
Member Avatar for z00mit

Hi Guys, I am trying to serialise a SAFEARRAY to a string. I tried this: SAFEARRAY* content; ... CComVariant value( content ); value.ChangeType( VT_BSTR ); BSTR bstrValue = value.bstrVal; _bstr_t temp; temp.Assign(bstrValue); std::string content(temp); However I get this error: error C2040: 'content' : 'std::string' differs in levels of indirection from …

Member Avatar for Ancient Dragon
0
796
Member Avatar for r0ssar00

I'm currently developing a program to scrape my university's online timetable system and then convert the resulting data to iCalendar data. It's a learning exercise for me(I'm teaching myself C++) and there's a few things that still get me. I've been using XCode as my IDE for a while and …

Member Avatar for r0ssar00
0
139
Member Avatar for MrVile

I'm getting a compile error with this bit: [code]int valid(const char str[]){ int i, total = 0, multiplier = 10; for(i=0; i < 11; i++){ str[i] * multiplier += total; //this line is an invalid lvalue multiplier--; } if(total % 11 != 0) return 0; else return 1; [/code] I …

Member Avatar for MrVile
0
240
Member Avatar for neoseeker191

I have an assignment for class and I am having a bit of trouble. I need to do a few things to improve the efficiency of this program. The first thing I am having trouble with is that we are supposed to modify the shuffle function to loop row by …

Member Avatar for neoseeker191
0
1K
Member Avatar for magnum7

Hello, I've been trying to solve a problem for quite a few hours. There's a 3x3 matrix with the digits 1-9 randomly placed. The task is to palce the digits in a particular order so that every number formed on a column or roll or diagonal can be devided by …

Member Avatar for VernonDozier
0
329
Member Avatar for tomtetlaw

I want to know how to position and rotate a gun to make it look like it does in other FPS games, any help?!?

Member Avatar for tomtetlaw
0
128
Member Avatar for clutchkiller

is there a way to contain the text in a normal format when writing out to a text file? By this i mean, if i have cout output a million a's, instead of one long line if u open and view the txt file, it is many rows. Thanks

Member Avatar for clutchkiller
0
106
Member Avatar for Liszt

I have made a Form application that contains of 2 Forms. In these 2 Forms I have added controls and a lot of code behind. How will I "Close the code" to this project so no one can open it and see all my code that I have done. I …

Member Avatar for Liszt
0
81
Member Avatar for mahdiahmadirad

Hi Dears! I am a Beginner, Please Help Me. If you Can Help me to find out how to sort a 2d arrays of characters with [U]recursive bubble[/U] sort algorithm. I have got something but it doesn't work. what is my mistake? I Did codes below So far, but it …

Member Avatar for cikara21
0
797
Member Avatar for mostermand

Hi. I am making an application that will use the screen and do something with it(live). My problem is that when i do that i get the previous screen made by my program last time i updated the window what would you suggest i do? any help would be appreciated.

Member Avatar for mostermand
0
65
Member Avatar for winrawr

[icode] someprogram.cpp -----------> #include<string> | | #include"someheader.h" V someheader.h --------------> #include<string> [/icode] what happens if I do this? Is it necessary to include the headers into all files that use them, or can you just go [code=C++] #include<string> #include... #include"someheader.h" #include"anotherheader.h" [/code] and string and other required headers will be …

Member Avatar for cikara21
0
84
Member Avatar for athlon32

I don't know if this is the right place to post this but here goes nothing. I know this is such a cliche from us C++ coders, but I wanna make my own open source OS. I would use something like BSD or Linux, but I really wanna use C++ …

Member Avatar for shasha821110
0
111
Member Avatar for Faterin

I use this [code] #include <fstream> #include <iostream> using namespace std; class Student { public: char FullName[40]; char CompleteAddress[120]; char Gender; double Age; bool LivesInASingleParentHome; }; int main() { Student one; strcpy(one.FullName, "Ernestine Waller"); strcpy(one.CompleteAddress, "824 Larson Drv, Silver Spring, MD 20910"); one.Gender = 'F'; one.Age = 16.50; one.LivesInASingleParentHome = …

Member Avatar for damani88
0
254
Member Avatar for madrang

Hi, i'm making my own game engine on sdl + opengl i also know that i can manage file for my setting and save game that way (i am on windows) [code] #include <windows.h> void ini::setfile(std::string name) { name += ".ini"; std::string directory; char path[1024]; GetModuleFileName(NULL, path, 1024); directory = …

Member Avatar for madrang
0
103
Member Avatar for Pabs666

pretty basic problem but my C++ is pretty far back here's my problem I have to read a text file and parse all the different field ex: 001 R0S11 182983 2009/02/22 45607 002 R0S12 182983 2009/02/23 45707 003 R0S13 182983 2009/02/16 45807 004 R0S14 182983 2009/02/04 45907 .... once I've …

Member Avatar for Ancient Dragon
0
93

The End.