49,757 Topics

Member Avatar for
Member Avatar for Labdabeta

Can somebody help me, I wish to learn OpenGL and I don't understand how to set it up. I am using a windows XP machine with Code::Blocks 8.2 and MingGW. How do I get OpenGL working?

Member Avatar for Labdabeta
0
459
Member Avatar for jason316

When I run it starts with a junk value in the first node. I can't get the getValue function to work properly either I get error that says to few arguments when I try to call it in main. Also the minValue and maxValue doesn't output anything and I tried …

Member Avatar for VernonDozier
0
288
Member Avatar for toferdagofer

This is a mastermind game. I was trying to make sure that my twoD array was beinga ssigned right by printing it out real quick before i use it to draw a board in the console. For some reason im gettin these errors and i dont even have a clue …

Member Avatar for pseudorandom21
0
179
Member Avatar for kimkim0513

the program should check if all [U]even [/U]integers from [I]low [/I]to [I]high [/I]can be written as the sum of two prime numbers the lower limit [I]low [/I]will be greater than 2 the upper limit [I]high [/I]will not exceed 10000 assume both inputs for [I]low [/I]and [I]high [/I]are even if all …

Member Avatar for TrustyTony
0
248
Member Avatar for UltimateKnight

I saw a code that had <conio.h> and the whole code is working nice but this line seems to be the error. I know that this is old one and the .h format is replaced with using namespace but still I get an error. What is the problem? Maybe the …

Member Avatar for UltimateKnight
0
156
Member Avatar for gretty

Hello I have a Container class that will allow me to store & retrieve elements from it easily by using the member variables of the elements as their key/identifier. My problem is I am tring to store a pointer to an objects member variable, but I get a compiler error. …

Member Avatar for rubberman
-1
165
Member Avatar for goocreations

Hi all. I have detected something that I can't explain, and hope someone can help me. I have 2 functions for allocating and de-allocating arrays: [CODE]char **c; void allocate() { char **c = new char*[1000]; for(int i = 0; i < 1000; i++) { char *g = new char[10000]; for(int …

Member Avatar for rubberman
0
140
Member Avatar for CrazyMisho

Hello I try to make one linked list to double linked list but i have some probems with this .Can somebody help me? This is yhe the linked list: [CODE]typedef struct ns { int data; struct ns *next; } node; node *list_add(node **p, int i) { node *n = (node …

Member Avatar for rubberman
0
137
Member Avatar for jason316

I am having a compiler error that causes a screen to pop up that says break or continue. I know it is something wrong with my program but I am at a lost as to what it is. I was just trying to test the first function as you can …

Member Avatar for rubberman
0
250
Member Avatar for FujiFilm

I haven't programmed in sometime and am rusty. I was never an expert either. I know my code has a simple error but I can't figure out what it is. I was practicing coding when I couldn't determine why the class constructor wasn't working as intended. #include <iostream> using std::cout; …

Member Avatar for rubberman
0
138
Member Avatar for iamuser_2007

i see this code in this thread, i want to know how to get input by user or from file in this code. for example this list how to use it as input in this code. i don't know how to modify and how to use it. Daniweb thread reference …

Member Avatar for iamuser_2007
0
188
Member Avatar for daianahoney

[code=c++] int main() { Ferma *f[20]; int i=0; int e=0; do { cout<<"Alegeti optiunea:\n"; cout<<"1.rata\n" <<"2.gaina\n" <<"3.porc\n" <<"4.vaca\n" <<"0.iesire\n"; cin>>e; switch(e) { case 1: f[i]=new Pasari("rata"); //error at this kind of assignement i++; break; case 2: f[i]=new Pasari("gaina"); i++; break; case 3: f[i]=new Mamifere("porc"); i++; break; case 4: f[i]=new Mamifere("vaca"); …

Member Avatar for daianahoney
0
238
Member Avatar for daianahoney

Hello forum. I cant figure out how to overload the '+' operator or maybe theres another error? Im posting from phone so excuse the slopyness. Thanks! [CODE]#include <iostream> #include <string.h> #include <ctype.h> using namespace std; class Ferma { public: static int nr_rate; static int nr_gaini; static int nr_porci; static int …

Member Avatar for daianahoney
0
234
Member Avatar for pseudorandom21

For simulating mouse movement on windows would it be better performance-wise to move the cursor to absolute coordinates or to move it relative to it's previous location? Obviously if moving to an absolute location each pixel in between must also be reached.

Member Avatar for pseudorandom21
0
351
Member Avatar for eman 22

I want to sort array of int, strings or any data type. Therefore I decided to use comparable array as an input to my sort function. But I get an error when I using it. Comparable arr[]; the compiler says "comparable is undeclared identifier". I think I must include specific …

Member Avatar for cppgangster
0
269
Member Avatar for custurd122000

I have to modify the myqueue and mystack templates and make a new class called myerror in order to make the main.cpp work, im getting countless errors tho in the main.cpp Here are my errors [code] main.cpp: In function ‘int main()’: main.cpp:52: error: no matching function for call to ‘MyStack<double>::MyStack(int)’ …

Member Avatar for jonsca
0
283
Member Avatar for Jsplinter

I am using a map in the standard way. It holds keys and values and sorts them by key and works wonderfully. However, after I am through adding to the map, I need to rank the keys based on their associated values. What is the best solution? A) Take map<myKey, …

Member Avatar for mike_2000_17
0
4K
Member Avatar for guvenc

Hi, I need to use the libraries of a commercial solver NOMAD in my C++ code. I got error LNK2001 error. I have #include "nomad.hpp". In the NOMAD handbook, the following is written. If you are using Visual C++, your programs will not link with this version of the library …

Member Avatar for guvenc
0
355
Member Avatar for chintan_1671

[CODE] // mainfrm.h enum { logAll = 0xff }; void Log(int nIdx, LPCTSTR lpText, int nType = logAll, LPCTSTR lpDeviceName = NULL); //SesLog.h int m_nDeviceID; CString m_strDeviceName; // SesLog.cpp #include "Mainfrm.h" #include "SesLog.h" void CSessionLog::Log(LPCSTR lpText) { if(m_pParent) m_pParent->Log(m_nDeviceID, lpText, logAll, m_strDeviceName); [/CODE] error LNK2019: unresolved external symbol "public: void …

Member Avatar for Narue
0
285
Member Avatar for miguelsan

Hello I have a question regarding the function length(). I want to find out the length of the string that is inputted by the user. When I use the length() function it only counts the characters from the first word. Can somebody please take a look at my code and …

Member Avatar for Narue
0
165
Member Avatar for kimkim0513

this is an assignment homework I have defined a structure X.... [CODE]struct X{ string name; char grade; }; [/CODE] here are the questions a) Declare r as a variable of X, s as a pointer variable to X and w as a pointer variable to a pointer of X. [CODE]X …

Member Avatar for Narue
0
148
Member Avatar for something_techy

Hello, I am trying to read exact 2 bytes from binary file, and transfer it to int, whatever is it 2 or 4 bytes. Atm on my computer is 4 bytes. So I have two bytes into four bytes scenario. I am using this code [CODE]ifstream in_stream; in_stream.open("test.dat", ios::binary); streamoff …

Member Avatar for Narue
0
299
Member Avatar for jimmymack

[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: virtual public Person { public: Teacher(std::string theName, std::string theClass); void teach(); void introduce(); …

Member Avatar for jimmymack
0
131
Member Avatar for Rocker Gang

I am having a network class and a dialog class.I have to send the data recieved in network class to dialog class but not direcly i.e it should not be tightly coupled with my dialog. Help me out..............

Member Avatar for Ancient Dragon
0
130
Member Avatar for munitjsr2

[CODE] #include <iostream> #include <fstream> using namespace std; int main() { char ch; ofstream outf("ITEM.txt"); cout << "Enter item: "; char name[30]; cin >> name; outf << name << "\n"; cout << "Enter item cost: "; float cost; cin >> cost; outf << cost; cout << "written to file item.txt\n"; …

Member Avatar for munitjsr2
0
316
Member Avatar for garu525

When I click on any of my menu bar, the menu wont expand or sometimes it does but missing some. I tried reinstalling and resetting it but it still doesn't work. Please help. Thanks. I attached a print screen of the problem.

Member Avatar for barnum
0
320
Member Avatar for schrope

help i am a beginner and i need help with my final program. i beleive i have everything set but i am not sure how to write the function. i want the function to add up all of the rides and give a grand total but i can not get …

Member Avatar for Saith
0
100
Member Avatar for Derek Elensar

I have said program: [code] #include <iostream> #include <fstream.h> #include <conio.h> using std::cout; using std::cin; using std::ios; using std::endl; int main() { char first[6]; char middle[16]; char last[16]; int counter = 0; char temp; cout << "Please enter your first, middle, and last name:\n>"; cin.get(first, 6); cin.ignore(80,'\n'); cin.ignore(80, ' '); …

Member Avatar for Derek Elensar
0
201
Member Avatar for Billy D

I'm not sure if this is possible. Basically, I have a function that will detect the current active user. [CODE]string currentUser() { string user; ofstream outf("CurrentUser.dat", ios::trunc); system("whoami >> CurrentUser.dat"); outf.close(); ifstream inf("CurrentUser.dat"); inf >> user; return user; }[/CODE] I have another function which will create a directory in the …

Member Avatar for Billy D
0
359
Member Avatar for Skaii

First let me thank you for taking the time to read this. I've been working on this code for a while and I can't seem to get it to run. Basically what I have to do is take in data from a file then output the data in a report …

Member Avatar for Skaii
0
119

The End.