49,761 Topics

Member Avatar for
Member Avatar for SillyNoob

**IDE: **MS Visual Studio 2008 Professional **Compiler:** Unknown First off let me thank any of you who take the time to read this and reply back. I'm having a ridiculous amount of trouble returning a pointer from a function and then using that returned pointer to change the pointer-pointer in …

Member Avatar for SillyNoob
0
231
Member Avatar for Labdabeta

I have the following code to draw a scene to opengl, but nothing shows up, just a blank screen! void glCameraDraw(const LABglCameraHANDLE h, LABglWindowHANDLE LABglGlobals) { if (!h->isProjected)//check to see if h's projection is loaded { glMatrixMode(GL_PROJECTION); glLoadIdentity(); //LABglGlobals->LABglDimensions are the screen dimensions gluPerspective(h->fov,(float)LABglGlobals->LABglDimensions.right/ (float)LABglGlobals->LABglDimensions.bottom, h->front,h->back); h->isProjected=true; } //set the …

0
82
Member Avatar for Labdabeta

I need to calculate chi squared cdf from x->infinity with n=255 degrees of freedom. I cannot seem to get it to work. You can find formulae for chi squared distributions using google. Here is my non-functional approximation code: double riemannsum(double(*fnc)(double),double dx, double xmin, double xmax) { double ret=0; double x=xmin; …

Member Avatar for Labdabeta
0
612
Member Avatar for nicprog

can you explain how to chack all the char inside the array without check only the first and it says equal for(j=0;j<len;j++) { if (letter==copywords[j]) { //words[j]=copywords[j]; words[j]=letter; cout << "good guess: " << words[j] << endl; //correct } else if(words[j]==copywords[j])) /problem { cout << "done!!!" << endl; system ("pause"); …

Member Avatar for zeroliken
0
122
Member Avatar for subith86

Anybody of you got any idea what this "internal compiler error: Segmentation fault" means? I searched internet, but didn't get anything useful. Then I did my analysis. I found out something peculiar. The code that I am trying to compile is a file for unit testing one of our classes. …

Member Avatar for mitrmkar
0
3K
Member Avatar for don't give up

hello please help me it's important i want code c++ convert from array to another " example: **user enter : acb** array1[0]=a array2[0]=1 and array1[1]=b array2[1]=2 array1[2]=c array2[2]=3 **out put for user : 132 ** thanksthankthanthatht

Member Avatar for don't give up
0
183
Member Avatar for anonymous1987

Need help, trying to perform arithmetic operations using words, so far i've got to the stage where if the user enters a number in words with the operation type eg(one + six), the result is printed out as an int. But i am unable to convert this int back to …

Member Avatar for Lerner
0
166
Member Avatar for MasterHacker110

I need help with a program i am writing. It takes in a line from the user and then decides wat to do. there are to many options to spesify. some of the options are: set TARGET 453.212.556.22 This command will differ becuase the host will never be the same. …

Member Avatar for MasterHacker110
0
238
Member Avatar for ddm

Design a CPU Timer class (you may name it CPUTimer). This class should allow the user to start timer, stop timer, compute delta time and print the lapsed CPU time of any block of code in a program. #pragma once #include <iostream> #include <cmath> #include <ctime> #ifndef CPUTimer_h #define CPUTimer_h …

Member Avatar for mike_2000_17
0
144
Member Avatar for visitor11

why is it "ur project is out of date" when i try to run cpp file opencv on vbs 2008

Member Avatar for Ancient Dragon
0
169
Member Avatar for Nawaf15

Hi everyone, I have been having problems with this code. I can't figure out how to get it to sort items alphabetically. Another problems is that the code never reads items from disk, but I can't figure out where the problem is. I hope you guys can help me. #include …

Member Avatar for histrungalot
0
202
Member Avatar for James19142

This app I finally got the splashscreen to the way i want it, but when I run the .exe from the explorer the splashscreen loses its transparency and has a white background replacing the glow; In when the compiler runs it directly after it builds it look exactly how it …

0
113
Member Avatar for triumphost

I have a class that just creates a blank bitmap it's quite large so I removed a LOT! of code to make it easier to see my problem. No knowledge of bitmaps required. I declared "Pixels" as an array of RGB but in one function, Pixels is empty whereas in …

Member Avatar for triumphost
0
220
Member Avatar for simagen

I am (trying) creating a program with C++ to RESTORE A SHUFFLED IMAGE. The program will be used to restore the original image from the standard original pic that has been shuffled, and will also be tested with the shuffled picture that has graphically edited with a NOISE effect this …

0
53
Member Avatar for Nawaf15

Hi everyone, I'm just trying to get this address book to sort the names alphabetic lly but I could not figure it out. I know I will add an extra case with a unique letter but where do I define the function? One more thing, my code is having some …

Member Avatar for Nawaf15
-1
181
Member Avatar for ashboi

int isaMUstring(char* sequence, int size) //function isaMUstring(char* sequence, int size) { int i,j; for(i=0; i<size; i++) { if(sequence[i]=='M'||sequence[i]=='U'||sequence[i]=='I') j=1; else j=0; } return j; } int canApplyRule1(char* sequence, int size) //function canApplyRule1(char* sequence, int size) { if(sequence[size-1]=='I') return 1; else return 0; } int canApplyRule2(char* sequence, int size) //function canApplyRule2(char* …

Member Avatar for scudzilla
0
127
Member Avatar for ChaseRLewis

So am doing a run down of different 3DMath Libraries. I am noticing functions with return types are HORRIBLY inefficient compared to void returns. I decided to do a rundown of how move constructor/assignment effects this. Well having a move constructor is seeing an average of 3.5-4x improvement, but doing …

0
59
Member Avatar for nuclear

I had this talk with a friend a while back and now i remmember that he said that C# is like a newer version of C++, but i think thats not correct, since C, C++, C# is kinda all oriented in this or that, what do you guys think of …

Member Avatar for mike_2000_17
0
160
Member Avatar for MasterHacker110

I am writing a game. The game will be controlled by the cmd, it is like a hacking game. You type: run exploit545.exploit www.tktktk.switchnet and it will exploit that exploit at the targeted computer (url). My problem is i cant seem to find a way to make the program read …

Member Avatar for MasterHacker110
0
143
Member Avatar for caltech

okay so here's my code but i knwo there's just something so wrong with the second/youngest one. the first/oldest part works though. int oldest = 0; // Determine and print oldest employee(s): for (int i=0; i<recordlist.size(); i++) { if (recordlist[i].age > oldest){ oldest = recordlist[i].age; } } cout << "Oldest …

Member Avatar for NathanOliver
0
939
Member Avatar for minghags

Hello! I just want to ask you guys if anyone can help me reedit my program from BFS to DFS. I know how BFS works but i can't figure it out how to write the sintax. So i would please ask you guys if you could help me out. Heres …

Member Avatar for Labdabeta
0
434
Member Avatar for Yozuru

So I have a programming lab that we did in class for a few months but I am having major difficulity on it. These are the directions: > Specifications for Calculate grades using loops 1. Create pseudo code for your program first, to be handed in. 2. Make the program …

Member Avatar for FelineHazard
0
1K
Member Avatar for Kamina00

Hello I am learning templates and at the moment I have created a templated QuickSort function. It's rather short and self explanatory. However during the call to the QuickSort Driver function I get a No matching call error. I have detailed the error message in full at the bottom of …

Member Avatar for Kamina00
0
260
Member Avatar for jonajonlee

So in my class we are learning about strings. In this program, the goal is to reformat the text in a data file. sample data file: Here's a "TEST" file. (DateD 5 April, 2012) Will this #*PrOGRAM+=@ that includes !user-defined?!?> FUNCTIONS really work? Only time will tell............. My program needs …

Member Avatar for deceptikon
0
218
Member Avatar for dmoneyrpyt

# Can someone help me with this program by fixing it I should finish it before tomarrow and I don't know where I went wrong# #include<stdio.h> //header file #include<conio.h> //header file #include<stdlib.h> //header file #include<time.h> //header file #include<math.h> //header file #define PI 3.14159 //header file indicating that pie is equal …

Member Avatar for DJSAN10
0
231
Member Avatar for grh1107

I'm trying to create a class which finds the sum of multiples for a given base I have the code written with out a class im just having trouble converting it into a class my total function isnt retrieving the data from the object maybe? /* If we list all …

Member Avatar for Banfa
0
180
Member Avatar for wildplace

bool aCondition = true; for(int i=0; i<numOfThreads; i++){ pthread_create(&firstThreads[i], NULL, &myThreads1, (void*) NULL); if(aCondition == true)//for here, if some condition is true i want at least one thread from firstThreads to complete before any secondThreads runs pthread_join(firstThreads[0], NULL); pthread_create(&secondThreads[i], NULL, &myThreads2, (void*) NULL); } for(...) //join the rest of the …

0
62
Member Avatar for wildplace

int main(){ fstream in; in.open ("myFile.dat", fstream::in | fstream::out | fstream::app); char* temp = new char [40]; string aString; in.write("123\n",4); getline(in, aString); //in.read(temp, 4); cout<<aString<<endl; } i want to either display the text already in myFile.dat or 123 if it was a empty file i tested with a emtpy file, …

Member Avatar for wildplace
0
74
Member Avatar for ChaseRLewis

So in my scripting project I mentioned yesterday I was thinking about how to implement arrays. That got me to thinking how does c++ get arrays and inherited classes to interoperate and found out some wierd things class Y { public: int A; Y() { A = 0; } }; …

Member Avatar for ChaseRLewis
0
150
Member Avatar for dmoneyrpyt

# I HAVE DONE ABOUT EVERY THING AND I CANNOT SEEM TO SEE WHERE I WENT WRONG CAN SOMEONE PLEASE TELL ME WHAT I DID WRONG I NEED TO DONE THIS BY TOMARROW ASAP!!!!!!# #include<stdio.h> //header file #include<conio.h> //header file #include<stdlib.h> //header file #include<time.h> //header file #include<math.h> //header file #define …

Member Avatar for zeroliken
0
250

The End.