49,761 Topics

Member Avatar for
Member Avatar for element432

Im trying to do a exercise in one of my books and it wants me to use a function to get the factorial of a number entered by the user. Ive tried several different ways and they either get me numbers that make no sense or say if I entered …

Member Avatar for element432
0
123
Member Avatar for pseudorandom21

Sooo... Every DLL injection result I've read so far only uses a pre-made DLL, loads it into another process and says "darn I'm good." They do absolutely NOTHING useful and a couple of them are rip-offs of one another only using a different programming language. Google has failed me! Once …

Member Avatar for pseudorandom21
0
180
Member Avatar for chunalt787

I just finished with my first year of Computer Science in college and over the break I wanted to learn how to do output from a computer using a C++ program to control different I/O hardware. I was thinking I would start somewhere simple with something such as turning on …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Rocker Gang

Hai I am drawing 3*3 rectangle by using Rectangle(),bt now if i click on that rectangle i wanna display the image in that rectangle,which is selected from the list control. I know that i wanna handle OnLButtonDown() message, bt my problem is i couldnt differentiate the rectangle which i drawn …

Member Avatar for pseudorandom21
0
119
Member Avatar for kadhaipaneer

Hi I am trying to make arrays inside a structure.. the structure looks like, [code=c++] struct mystruct{ int val; int num; string state[]; mystruct *next[]; }; [/code] The next pointer array works fine but state array gives segmentation fault. I have an array of this structure . mystruct Graph [];

Member Avatar for vijayan121
0
139
Member Avatar for kadhaipaneer

I have a problem passing an array containing pointers. Here's the function.. [code=c++] void jointtree(Parent *clique[], int nodes); [/code] I am calling it the following way.. [code=c++] jointtree(clique, nodes); [/code] where clique is. [code=c++] Parent *clique[nodes]; [/code]

Member Avatar for L0s3r
0
153
Member Avatar for Derek Elensar

This is my final project for my C++ class online. I was instructed to make a test and to pull answers from withing a .txt file and compare them to the answer that the user inputs. I'm sure there's a much easier wau of doing things than the way I'm …

Member Avatar for Derek Elensar
0
227
Member Avatar for dilequeno

I am trying to write a program in c++. I have a file that contains thousands of numeric entries sorted into four columns. The structure of the data looks something like the following: 3 0.2 0.5 6.2 4 0.1 0.6 6.2 //Track 1 2 0.8 0.5 0.6 2 0.6 0.5 …

Member Avatar for Ancient Dragon
1
313
Member Avatar for kutuup

Hi all, I'm trying to build a program in visual studio 2008, when I build in debug mode, it runs just fine, but if I try to build in release mode, there are no errors but when the program runs I get this error: The program can't start because MSVCR90D.dll …

Member Avatar for kutuup
0
493
Member Avatar for Drau

im trying to convert double to string with this code: if its a number like 3.7345 than its working - but if its 5.0 (only zeros after the point) [CODE] double number=5.0; string ToString; stringstream out; out << number; ToString = out.str(); return ToString;[/CODE] it returns - 5 and i …

Member Avatar for Drau
0
150
Member Avatar for kutuup

I'm trying to read integers in a .txt file into a 2 dimensional array (map). Here is the function: [CODE] void loadmap(int mapnum) { int x; ifstream inFile; inFile.open("level1.txt"); if (!inFile) { cout << "Unable to open file"; //exit(1); // terminate with error } for(int countline = 0; countline <= …

Member Avatar for kutuup
0
343
Member Avatar for axeves

Hi. Can you explain to me on how to "inherit" (if that's the right word) stuff from a header file, and on how to write one? (A header file) Like if i wrote this; [CODE] class Foo { int a = 123; } [/CODE] in a header, how would i …

Member Avatar for pseudorandom21
0
123
Member Avatar for Muhammad Anas

I just found a question whose statement is as follows: [COLOR="Green"]Write a function contains(const char*, char) which returns the pointer to the first (left-most) occurrence of the 2nd parameter char in the 1st parameter cstring, or NULL if the cstring doesn't contain the char. [/COLOR] Another condition is that inside …

Member Avatar for Muhammad Anas
0
263
Member Avatar for luislupe

I have several vectors of int elements. Now I want to create a vector of vectors, but I don't want to copy the vectors to the new one. If possible, I'd like to pass them by reference. Please consider: [code=c++] #include <iostream> #include <vector> using namespace std; int main () …

Member Avatar for ravenous
0
206
Member Avatar for karenjev

Good day, i'm creating a calculator in c++ using visual c++. I got error's as below [CODE]c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C2144: syntax error : '__w64 unsigned int' should be preceded by ';' c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C4430: missing type specifier - int assumed. Note: …

Member Avatar for fpm777
0
1K
Member Avatar for lochnessmonster

im curious as to if anyone knows the internals of how cout works? for example the step by step internals of what happens when executing the following statement in c++ cout << "hello world" << endl; -thx

Member Avatar for vijayan121
0
117
Member Avatar for curly3top

help me please :sad: if you can find out what's wrong w/ my program, please do tell. thanx very much! #include <iostream> using namespace std; void get_start(int start_hour, int start_min) //Precondition: User is ready to enter the values for the hour and the minute. //Postcondition: Values in hours (24-hour notation) …

Member Avatar for pseudorandom21
1
223
Member Avatar for jenymaru08

elow I'm trying to create a program that will display the output : [code] * ** *** **** [/code] please help me [code=c] int main() { for(int i=0;i<=7;i++) {for(int j=0;j<=i;j++) cout<<'*'; for(nt k=0;k<=i;k++) cout<<' '; [/code] then what next its only give the output [code] * ** [/code] please help …

Member Avatar for EMDArellano
0
129
Member Avatar for AlvinLiu

/** readGradeFile ******************************************************* * Read the data from inf into the parallel arrays given. * @params inf -- input file to read data from @pre inf is already open * id[] -- container for student id #s * asgts[] -- container for assignment grades * mt[] -- container for mid-term …

Member Avatar for VernonDozier
0
142
Member Avatar for creck

hi, i would like to ask you to help me 'cause i am pretty new in programming and idk what's wrong with that :/ i am still getting an error that " 'main' must return 'int' "...thanks [CODE]#include<iostream> #include<string> using namespace std; class GradeBook { public: void displayMessage(string courseName){ cout<<"Welcome …

Member Avatar for Narue
0
83
Member Avatar for Argo54325

Hello I'm getting these 2 LNK errors and haven't been able to figure out how to resolve them, any help is greatly appreciated! Its was an empty Win32 Application that i created and added code into from existing source. [CODE]Error 1 error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function …

Member Avatar for Argo54325
0
230
Member Avatar for lexusdominus

I am a beginner with win32 programs, and am trying to integrate my console into a window. My console program starts a new thread which creates a window. [CODE]DWORD dwThreadID = 0; HANDLE hThread = CreateThread(NULL,0,ThreadProc,argv[0],0,&dwThreadID);[/CODE] i want to create a miniature output textbox within my window, which reads the …

Member Avatar for Ancient Dragon
0
210
Member Avatar for DotNetUser

I have to pass a pointer to a callback function. When the callback function is not a member function in my class, the argument &callback works. When I make the callback function a member function, I get a compiler error: "error c2276 '&' : illegal operation on bound member function …

Member Avatar for pseudorandom21
-1
2K
Member Avatar for C++NewBe

This is what I have, How would I declare the array based on what I already have? [CODE]#include <iostream> #include <fstream> #include "tempFns.h" using namespace std; int main (void) { // DO: declare an array of type double called temperatures // Use the constant MaxDays for the number of rows …

Member Avatar for YOUSAFZAI
0
121
Member Avatar for calc

Hi, this is my first post. I'll try to keep it short. Basically, I'm trying to solve a one-way wave equation using finite differences. I'm trying to put the values in an multidim. array, where a column represents a time step. The first column is the initial condition. I calculate …

Member Avatar for calc
0
139
Member Avatar for starbucks_life

I am working on the menu of a 3D symbian3 game.I am trying to load a png image of size 91 by12 using GFloat(opengl function) vertices_of_image[ ].....but the text in the image is coming out to be wrapped around. i.e.if my text contains ROCKS...then a portion of the alphabet S …

0
70
Member Avatar for theguitarist

[CODE] int x,y; while(cin>>x>>y) { if(x>y)cout<<x<<"\n"; else if(y>x)cout<<y<<"\n"; } [/CODE] This seems clear,but when I entered this: [CODE]2 4 6[/CODE] and hit enter, I get this: [CODE]4[/CODE] after which I am being asked to enter something again. I put 8, and it prints 8. But what is exactly happening here? …

Member Avatar for WaltP
0
489
Member Avatar for Nor96x

I'm looking for a method of packing all the files of my applications into one archive, and the ability to extract & load them into memory at runtime with C++. I've tried googling it, but I'm not sure if I'm searching with the right criteria because I'm not finding much. …

Member Avatar for vijayan121
0
91
Member Avatar for montjoile

I have this structure: [CODE] typedef struct nodo{ int dato; struct nodo *izq; struct nodo *der; }nodo; typedef struct nodo *avl; [/CODE] I have this method: [CODE] void insertar(avl *r, int dato){ if (*r==NULL){ *r=(nodo*)malloc(sizeof(nodo)); (*r)->dato=dato; (*r)->izq=NULL; (*r)->der=NULL; [/CODE] All this code works perfectly. My question is about the line: …

Member Avatar for montjoile
0
115
Member Avatar for element432

Im trying to have this program continue to run when you enter y or Y at the end or quit when you enter n or N. Everything I try either has it just end or continue to repeat. Any help would be great, thanks! [CODE] #include <iostream> #include <cmath> #include …

Member Avatar for element432
0
172

The End.