49,757 Topics

Member Avatar for
Member Avatar for ChrisMackle

Im getting these errors, what do they mean? its DEFINITELY not my code because it works when i compile it in codeblocks but not in microsoft visual c++ 2008. 1>------ Build started: Project: DropBlock, Configuration: Debug Win32 ------ 1> player.cpp 1>c:\users\chris\desktop\c++\-zcomplete game\backup\player.cpp(43): error C2065: 'blocks' : undeclared identifier 1>c:\users\chris\desktop\c++\-zcomplete game\backup\player.cpp(43): …

Member Avatar for mike_2000_17
0
264
Member Avatar for memomk

hey i have this error The debugged program raised the exception unhandled RuntimeError "underlying C/C++ object has been deleted" the code is: class qthread(QtCore.QThread): def __init__(self, x, y, z): self.x=x self.y=y self.z=z self.name="" self.m=hashlib.md5() def changeresultsig(self, text): self.emit(QtCore.SIGNAL("changeresult(text)"),text) def conssig(self, text): self.emit(QtCore.SIGNAL("cons(text)"), text) def enablesig(self): self.emit(QtCore.SIGNAL("enable(")) def disablesig(self): self.emit(QtCOre.SIGNAL("disable()")) def …

Member Avatar for memomk
0
952
Member Avatar for Sendy Hipo

i have this problem to write and read data, here's what im trying to make : Write a program that uses a structure to store the following inventory data in a file: -Item Description -Quantity on Hand -Wholesale Cost -Retail Cost -Date Added to Inventory The program should have a …

Member Avatar for Sendy Hipo
0
608
Member Avatar for ktsangop

Hello everyone! I want to monitor my network using wireshark 's tshark command line tool. What i want to accomplish is to redirect tshark's output to a c++ application, so i can examine data and output a more comprehensive analysis without keeping a huge amount of data. I am working …

Member Avatar for ktsangop
0
947
Member Avatar for Simone Z.

Hi! In my program I have to calculate the Adler32 checksum of a file, but I've a problem in using this algorithm. The function prototype is: unsigned long adler32(unsigned long adler, const char *buf, unsigned int len); I know how to calculate the Adler32 checksum of a string, but in …

Member Avatar for Simone Z.
0
2K
Member Avatar for hmartinez

Hi, I am using curl to download files from the internet and it is working fine. The problem is that I am trying to check if the file exists before downloading it. I was thinking that if the file doesn't exist, then I would receive a CURLcode with and error, …

Member Avatar for hmartinez
0
978
Member Avatar for Clouded One

hi its me again, same program new problem... been working on this all day and i just cannot get it to work. #define INVENTORY_H #include <iostream> #include <iomanip> #include <string> #include <istream> #include <fstream> #include <vector> #include <ctime> using namespace std; class Inventory { private: static const char *Error[]; static …

Member Avatar for Clouded One
0
175
Member Avatar for OrangeTree

Hello :). How can I fix this? Yes, I can write 2 functions (with and without parameter) ... but what is bad there? #include <cstdlib> #include <string> #include <iostream> using namespace std; class CClass{ public: void foo(string & s = "default"); // COMPILE ERROR string backup; }; void CClass::foo(string & …

Member Avatar for OrangeTree
0
152
Member Avatar for Clouded One

hello, i am new to this site but i have used it as reference before. this is a program for one of my classes and i have everything done down to one error... error LNK2001: unresolved external symbol "private: static char const * * Inventory::Error" (?Error@Inventory@@0PAPBDA) 1>C:\Users\Joey\documents\visual studio 2010\Projects\JHabura PA …

Member Avatar for Clouded One
0
145
Member Avatar for OrangeTree

Hi :). I use this code to create a file: #include <cstdlib> #include <fstream> using namespace std; int main () { ofstream file("main/articles/giraffe/article.txt", ios::out); file.close (); return 0; } How can I simplify **create path of folders** (on **unix system**) "main/articles/giraffe/" - if folder "main" doesn't exist? With using standard …

Member Avatar for OrangeTree
0
241
Member Avatar for zenitis

I have a declaration of a 2d vector: vector<vector<int> > data; I want to add several times in an server-client problem an array of 25 elements. I donnot know how many times i must add that array(which changes its values). How can i add that element to the vector without …

Member Avatar for deceptikon
0
176
Member Avatar for Sendy Hipo

so i made this code that asks the user about corporate's data(division's name, sales, etc) #include <iostream> #include <string> #include <fstream> using namespace std; const int SIZE = 4; struct Division { string name; string quarter[SIZE]; double sales[SIZE]; }; void getData(Division []); int main() { Division corp[SIZE]; for(int count = …

Member Avatar for Sendy Hipo
0
180
Member Avatar for Epickup

#include<fstream> #include<iostream> #include<string> using namespace std; int main () { struct Candidate{ char RegNomer[4]; char name[60]; char party[60]; char age[3]; char xp[3]; long int votes; }candidate[200]; int i=-1; int i1=0; int check=0; char choice[1]; while (true) { system ("cls"); cout<<"/============\\=/============\\=/============\\=/============\\=/============\\ "<<"\n"; cout<<"| save | | create a | | banned …

Member Avatar for Epickup
0
146
Member Avatar for DemiSheep

Ok I started writing this program for a school project in Eclipse in windows and now shifting to vim in UNIX and I am getting a bunch of errors. I am currently trying to figure out the top two errors (And yes the funky characters are what I see). Here …

Member Avatar for Despairy
0
173
Member Avatar for R1111

**Hello, If I have an array, and want to make a heap tree out of it using make heap and sort heap, how would I do it? I'm struggling because I didn't take any course in data structure. Any help -in c++- will be appreciated :D**

Member Avatar for R1111
0
205
Member Avatar for cool_zephyr

hello everyone, i've trying to make a simple object(e.g. a simple robot with arms and legs) in openGL..but i've trouble finding how to write all the vertices within the code..is there any tool we can use to develop the objects separately..and drag the vertice co-ordinates into my program?? thank you

Member Avatar for cool_zephyr
0
174
Member Avatar for fka

Hi there, I'm writing some application based on Qt and C++ and I've reached the problem. How to display window via clicking, triggering, etc. I wrote some code: //---------------------------- // THIS IS IN mainwindow.h //---------------------------- #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : …

Member Avatar for mike_2000_17
0
194
Member Avatar for Sasstraliss

Quickselect, based on quicksort, and counting select, based on counting sort. Each is capable of finding the kth smallest element in an unsorted/sorted list/array. This is some example code for a QuickSelect algorithm. This doesn't include the partition function. // return the kth smallest item int quickSelect(int items[], int first, …

Member Avatar for mike_2000_17
0
527
Member Avatar for Chuckleluck

The title explains it well. I wish to know which variables I need to delete when my program closes. I assume you don't have to use the delete keyword on *every* variable that you initialize. Thanks in advance.

Member Avatar for Chuckleluck
0
214
Member Avatar for JoBe

Hello ladies and gents, Was wondering if any of you could help me out, how can I count the amount of numbers(digits) there are in one integer, for example: int integer = 123; integer has three digits. int secInteger = 10; secInteger has two digits. The reason for asking is, …

Member Avatar for jimmyraynor
0
343
Member Avatar for SCass2010

Hi everyone, At the moment I'm trying to create a class that contains a DOMNode* pointer, something like this class MyDOMNode { public: MyDOMNode (DOMNode* node) : mDomNode (node) { } bool operator== (const MyDOMNode& rhs) { if (mDomNode == rhs.mDomNode) return true; return false; } bool operator!= (const MyDOMNode& …

Member Avatar for deceptikon
0
159
Member Avatar for daino

I'm just wondering if the below is true? I pulled this from another forum. Does this mean that a application using qt4 can be built and used in a bank without getting permission or paying fees for it's use? *The Framework is freely available for Windows, Linux, MacOS X, and …

Member Avatar for daino
0
114
Member Avatar for gali01

#include <stdafx.h> #include <stdlib.h> #include <windows.h> #include <GL/glut.h> using namespace std; int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0; int rumus(int x1, int y1, int x2, int y2, int x){ int y=(x*(y2-y1)+x2*y1-x1*y2)/(x2-x1); return y; } void tampilkan() { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(0,0,0,0); glLoadIdentity(); glBegin(GL_QUADS); glColor3f(0.0,0.0,1.0); glVertex2d(2,2); glVertex2d(5,2); glVertex2d(8+c,11); glVertex2d(7+d,rumus(7,14,2,11,7+d)); glEnd(); glBegin(GL_QUADS); glVertex2d(7+e,rumus(7,14,5,11,7+e)); glVertex2d(9+f,rumus(9,14,2,11,9+f)); glVertex2d(14+g,rumus(14,2,2,14,14+g)); glVertex2d(11+h,rumus(11,2,5,14,11+h)); …

Member Avatar for m4ster_r0shi
0
102
Member Avatar for LieAfterLie

I was following [this tutorial](http://www.swiftless.com/tutorials/opengl4/1-opengl-window.html) for my first attempt at OpenGL. All I'm doing is initializing an empty window. His VS 2010 code is [here](http://www.swiftless.com/?download=1%20-%20OpenGL3%20-%20Window). Using Dev-C++ as my IDE on Windows 7, and MS SDK 7.1, I get this error: [Linker error] undefined reference to `_imp____wglewCreateContextAttribsARB' ld returned 1 …

Member Avatar for DeanMSands3
0
1K
Member Avatar for Sendy Hipo

hi, i have this problem about reading the file's content from the back Write a program that asks the user for the name of a file. The program should display the last 10 lines of the file on the screen (the tail of the file). If the file has fewer …

Member Avatar for Sendy Hipo
0
1K
Member Avatar for IndianaRonaldo

I started with curl and now I'm able to post form data, obtain html pages and all that basic stuff. But I'm unable to analyse individual data in the obtained webpage. Like filtering all the images, videos and things like that. I can do that in Javascript, but that can …

Member Avatar for mustafaneguib
0
240
Member Avatar for Labdabeta

I want to use opengl to draw some stuff, not to the screen but to a data buffer instead. Is this possible? IE: uint32_t *data; glSetDrawTarget(data,GL_RGBA|GL_UNSIGNED_INT_8_8_8_8);//this is the line I cannot figuro out how to do glBegin(GL_TRIANGLES); //... glEnd(); //and now my buffer is full of custom data glSetDrawTarget(NULL,NULL);//reset to …

0
129
Member Avatar for TedOlga

Dear All Please share your thoughts and ideas!!! I have thousands of files (.txt) which I have to parse and get bits out of them (e.g. 5th bit of each file is 0|1?).Anyway of dealing such lot files to analysis ??? int main(int argc, const char* argv[]) { for (int …

Member Avatar for Labdabeta
0
151
Member Avatar for jaskij

Hope I don't start a holy war ;) This question rose to my mind after starting a project with a couple of friends (my very first team project to be honest). We all agreed on CamelCase, but one friend suggested somethin unnatural to me, that is, starting names of all …

Member Avatar for two[ ][ ]
0
172
Member Avatar for profyou

i have been confused lately regarding where to concentrate... java or c++ or Algorithms & data structures or ........(there are still more languages) whenever i concentrate on java i tend to forget c++ or various algorithms or assembly( i have learned 8086/8088 programming). java is very large...core java......file io....swing..servlets....enterprise java...and …

Member Avatar for jackbauer24
0
284

The End.