51,593 Topics

Member Avatar for
Member Avatar for Labdabeta

I am still unable to get OpenGL Vertex Buffer Objects to work. I will just show you the code I have written so far: 3dglgui.h (I think this should be fine): [CODE]#ifndef CLASS_NAME #define CLASS_NAME "OpenGL Windows Class"//This can be overwritten to specify a unique class name #endif //Header Guards …

Member Avatar for raptr_dflo
0
160
Member Avatar for c_hickam

I can't speak as a master coder since I have little training in it, but currently I am working on a product line optimization problem which is very demanding in terms of needing to perform allot of sorting, searching and math so in the code I am using pointers, linked …

Member Avatar for raptr_dflo
0
101
Member Avatar for DeftArcher

The point of the program is to read from the file and then output to the other file, we HAVE to use an array as well as a function to do this. The problem I am running into is well... several problems. When I try to run the program I …

Member Avatar for raptr_dflo
0
395
Member Avatar for Javaid1

What is the difference between "G1" and "G1 " Particularly in this context if (memcmp (buf, "G1", 2) == 0) if (memcmp (buf, "G1 ", 3) == 0) Is this correct for "G1 "?

Member Avatar for raptr_dflo
0
114
Member Avatar for skiboy209

[CODE]#include <iostream> #include <string> #include <windows.h> using std:: cout; using std:: cin; using namespace std; int main() { unsigned long n; char Answer; string mystr; do { do { cout << " What is your name? "; getline (cin, mystr); cout << "Hello " << mystr << ".\n"; cout << …

Member Avatar for raptr_dflo
0
187
Member Avatar for David321

I've been having some trouble making the knights tour (getting a knight to go around a chessboard without touching the same square twice) work correctly. Right now the max amount of moves I can get out of it is 59. I can't figure out any reason why it shouldn't go …

Member Avatar for raptr_dflo
0
668
Member Avatar for existinglady

Can someone help me? after exiting the program.. the student record.txt becomes empty after i restart the program.. so far Im only after the name, last name, and student id because i dont want to confuse myself more but if someone could teach me here i might implement other datas.. …

Member Avatar for raptr_dflo
0
127
Member Avatar for kambi09

hi there please see my header file and cpp file, when i compile them i get these error classes.cpp:86.1: error: "vehicle::vehicle" names the constructor, not the type classes.cpp:172.1: error: "driver::driver" names the constructor, not the type here is my header file [code]#ifndef CLASSES_H_INCLUDED #define CLASSES_H_INCLUDED #include <iostream> #include <string> using …

Member Avatar for raptr_dflo
0
4K
Member Avatar for Clexify

[CODE]int main() { int num=2; int i=0; int user_num,x; cout<<"enter a number(number>4)"<<endl; cin>>user_num; int a[100]; for (i=0;i<100;i++) { a[i]=0; } while(num<=user_num) { x=2; while(x<=num) { if(num%x==0) { break; } x++; } if(x==num) { a[i]=num; i++; } num++; } int b[100]; for (i=0;i<100;i++) { b[i]=a[i]; } for (i=0;i<100;i++) { for(int j=1;j<100;j++) …

Member Avatar for raptr_dflo
0
334
Member Avatar for nblackburn

Hey guys, i found this awesome example on the internet written using autoit 3 script, i was wondering how this would translate in c++ so i can use this for one of my projects, any ideas would be awesome, thanks once again... [CODE] $sUserName = "username" $sPicPath = "usertile.png" ; …

Member Avatar for raptr_dflo
0
117
Member Avatar for jigglymig

need some help turning this single linked list into a circular linked list. I am completly lost on how to get the first node and link it to the last one [CODE]#include <iostream> using namespace std; struct node { int Item; node* Next; }; // end struct node* Head; typedef …

Member Avatar for raptr_dflo
0
217
Member Avatar for kk33

Hi all , here is my code for GET request to a http site, but it keeps taking memory nor releasing it, here is the code: [CODE] while(1) { hSession = WinHttpOpen( L"Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); if (hSession) hConnect = WinHttpConnect( hSession, L"lalala.com", …

Member Avatar for anirudh33
0
315
Member Avatar for WolfShield

I have some program ideas that I would like to build for PC, Mac, and Linux/Unix. The process I have in mind is to write the core libraries in C++, then program each UI based on OS. Windows: C# Mac: Objective-C and Cocoa Linux/Unix: C++ and GNome/Gtk But, I only …

Member Avatar for mike_2000_17
0
216
Member Avatar for MrAppleseed

I was looking up the stack, and trying to implement it in an array, and came across this code: [code=C++]void push(STACK *ps, int x) { if (ps->size == STACKSIZE) { fputs("Error: stack overflow\n", stderr); abort(); } else ps->items[ps->size++] = x; } [/code] I know what it all does, except the …

Member Avatar for MrAppleseed
0
118
Member Avatar for jashbela

Hi, I wrote this code to add 10 numbers and find their average. It will not out put average. What am I doing wrong? Thanks for the help. [CODE]#include <iostream> using namespace std ; int main ( ) { double Sum; double Average; double Numbers[10]; int K; Sum = 0; …

Member Avatar for Onlineshade
0
153
Member Avatar for ibthevivin

I'm having trouble with my C++ assignment because when I run the program I can't type more than one word on the "Enter your street name" line or it won't work. My teacher said something about "getline" but he really lost me. Here is what I have. Please help! [code] …

Member Avatar for Narue
0
295
Member Avatar for kutuup

Hey all, Just trying to build a program in VS2008 using the Allegro library. When I try to build (debug or release), the build completes, but when the program tries to run, I get an error saying that a file called "MSVCR80D.dll" is missing and suggests reinstalling the program. I …

Member Avatar for kutuup
0
679
Member Avatar for nblackburn

Hello, i have made an attempt at this to show im not lazy, but this currently doesnt work, it would mean the world to me if someone could help me finish this code asap, thanks again. [QUOTE][B]NOTE:[/B] Im trying to make this into a DLL for one of my projects[/QUOTE] …

Member Avatar for vijayan121
0
350
Member Avatar for IndianaRonaldo

[CODE] #include "stdafx.h" #include<iostream> #include<string.h> #include<fstream> #include<stdio.h> #include<cstdio> #include<curl\curl.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { return 0; } void main() { int p; CURL* curl; curl=curl_easy_init(); }[/CODE] The above is my code and I am trying to compile it in vc++ 10.But the error is: error LNK2019: …

Member Avatar for vijayan121
0
330
Member Avatar for skiboy209

[CODE]#include <iostream> #include <string> #include <windows.h> using std:: cout; using std:: cin; using namespace std; int main() { unsigned long n; char Answer; string mystr; do { cout << " What is your name? "; getline (cin, mystr); cout << "Hello " << mystr << ".\n"; cout << "What is …

Member Avatar for rubberman
0
195
Member Avatar for luciolon

Hi all, I'm new in C++ and I encounter a problem with a code I found on this forum. I simply try to add an integer to a Generic Doubly-Linked list. However, when I launch the following code (main function) [CODE]DoubleLinked<int> dlist; dlist.push_back(1);[/CODE] I got the following error : [CODE] …

Member Avatar for luciolon
0
270
Member Avatar for gianks

Hi all, i'm writing a Qt SIGNAL/SLOT capable class in order to be able to work with raw socket in a Qt application. To achieve this, i'm using a QSocketNotifier to monitor socket incoming data event in a S/S way. Now the problem: entering the event loop, causes the process …

Member Avatar for gianks
0
479
Member Avatar for beau_nerdathen

I have a project about making pascal triangle using recursive function. This is the example output: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 Hint:(x+y) n=>exponent. *Give me an idea about this project. Thanks!

Member Avatar for mike_2000_17
0
5K
Member Avatar for Bench

This code snippet outlines a simple, no-frills linked list. Tested under MSVC++ 2003 and Comeau, but not guaranteed bug free. Snippet includes example main() . This snippet is intended as an example of a possible implementation of a linked list class (Of which there are many variations) For a better …

Member Avatar for Narue
0
3K
Member Avatar for jayuma

Am new to socket programming.Can you please help me with this issue I need to connect two computers which is already under some network using C#. After it gets connected I need to know the details of the "Task Manager" of the connected computer - (If any pogram/file is running …

Member Avatar for Ketsuekiame
0
267
Member Avatar for jesminya

I'm new here, but it looks like an awesome place to get some help. My assignment is to write a recursive function that determines the value of a unit of Pascal's triangle given the row and column, then use that to display the triangle with n number of rows. It's …

Member Avatar for Onlineshade
0
1K
Member Avatar for synaps
Member Avatar for cherrymae.calma
0
205
Member Avatar for rajatchak

well, i have been working on two projects.... in of the projects i am getting two errors which i am unable to rectify ....please please could you possible identify the two errors for me...?? i shall be really really grateful.. you can try running the below program in Microsoft visual …

Member Avatar for cherrymae.calma
-1
314
Member Avatar for gotjeff5

I am trying to build a binary tree in c++ when I compile I get an error that says: [code] Undefined first referenced symbol in file Btree::destroy_tree(node*) /var/tmp//cc1bssfK.o Btree::remove(int, node*) /var/tmp//cc1bssfK.o Btree::insert(int, node*) /var/tmp//cc1bssfK.o Btree::search(int, node*) /var/tmp//cc1bssfK.o Btree::~Btree() /var/tmp//cc1bssfK.o Btree::Btree() /var/tmp//cc1bssfK.o ld: fatal: Symbol referencing errors. No output written to …

Member Avatar for mike_2000_17
0
102
Member Avatar for jigglymig

havn't programmed in c++ in well over a year and taking a new class at a different college. So I completly forgot how to work with linked lists. we are doing review so notes in book/slides don't include too munch information and is all in pseudo code. at the moment …

Member Avatar for jigglymig
0
108
Member Avatar for BarisD

Hello everyone, I'm not a very advanced programmer and here is my problem: I'm trying to write a hangman game and I want to use online dictionaries as database. I created a windows form application to do that. Is there a better option to achieve my aim? I could find …

Member Avatar for makman99
0
538
Member Avatar for rdhc1330

hey guys, just wondering how I can change this code to C++... It's an old code my brother actually made! [CODE] #include <stdio.h> const int ROW = 4; const int COL = 13; int main(void) { int i, c, max = COL; for(i = 0;i<ROW;i++) { for(c=0;c<COL;c++) { if(c == …

Member Avatar for mike_2000_17
0
826
Member Avatar for Heioingi

Please, please please someone help me. This might sound a little pathetic but I cannot figure this out for the life of me, it compiles just fine but i get the complete wrong output. Here is all the code I have. The problem: Write an application a that calculate the …

Member Avatar for Heioingi
0
1K
Member Avatar for MrAppleseed

I recently wanted to get involved in C++0x (Native, OS independent thread support?! Heck yes I want that!), and it seemed as though my compiler supports it. So, I added it in Code::Blocks, under Settings >> Compiler and debugger.. >> Global Compiler Settings >> checked "Have g++ follow the comming …

Member Avatar for mike_2000_17
0
187
Member Avatar for Mark198995

HEY im pretty lost i need to make a program where user has in enter a name and after it has been entered it has to repeat the name 100 times can someone please help me im fairly new and i cant get it to work =/. this is what …

Member Avatar for Mark198995
0
153
Member Avatar for coolbeanbob

I'm having trouble finding information on the implementation of "or". I want to use it in the do while loop below. [CODE] do { cout << "Please enter 1 for random or 0 for pseudorandom." << endl; //bool, 1 is TRUE, 0 False cin >> random; } while (random !0||!1);[/CODE]

Member Avatar for sfuo
0
94
Member Avatar for fullarmorzz

i have many questions to ask with regards to C++. In our programming class we do not use the "#include<iostream.h>" or something like that and MANY MORE! :D it is a lot different from ours anywhere i look. :D here is an example of our program. :D [CODE] #include<stdio.h> #include<conio.h> …

Member Avatar for Onlineshade
0
132
Member Avatar for goluman

[CODE] IpPairVec matches; blah blah other definitions for (unsigned int i = 0; i < matches.size(); ++i) { drawPoint(img1,matches[i].first); drawPoint(img2,matches[i].second); const int & w = img1->width; //.........etc etc etc } std::cout<< "Matches: " << matches.size(); //This returns a number after every iteration which is continuous. //I am able to redirect …

Member Avatar for Narue
0
179
Member Avatar for aastha takkar

program for tis structure given below: 1=1 1+2=3 1+2+3=6 1+2+3+4=10 ........ ............ ............. 1+2+3+4+5+6+7+8+9+10=55

Member Avatar for Onlineshade
-4
90
Member Avatar for 3YEARS

what is the source code having an output of 1 21 321 using for loop statement in microsoft visual c++? it must be right aligned

Member Avatar for Onlineshade
-6
150
Member Avatar for deanbrogada

Please help me to solve this problem..i need it today! Thank you. Sample input: Z Cozompuzutezer Sample output: Computer

Member Avatar for Onlineshade
-1
189
Member Avatar for uaremine
Member Avatar for thinkingofaname

hey im a new coder and the reason im getting into coding is to do some mathematical tests ive created several mathematical formulas that i want to turn into a program i dont have the c++ know how to do this though. what im wondering is if anyone would like …

Member Avatar for Onlineshade
0
136
Member Avatar for techy23

[I][B]Please help me with star patterns or anything with a patterns like 'x' in C++. What ois the logic behind it[/I]. [/B] x x ******** xx xx ******* xxx xxx ***** xxxx xxxx *** xxxxx xxxxx ** [B][I]these might look easy, but i dont get the logic. please give detailed …

Member Avatar for Onlineshade
-1
105
Member Avatar for rajatchak

[CODE] #include<iostream> #include<windows.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<fstream> #include<string.h> #include<windows.h> #include<fstream.h> #include<ctime> void checking(); void display(double); enum check{correct,incorrect}; class words { public: char word[20]; check cword; check cchar[20]; }; void main() { ifstream fin("Book.txt"); char ch; char wrd[20]; time_t start,end; double dif; cout<<"\n Enter the text below. Press 0 to finish …

Member Avatar for rajatchak
0
1K
Member Avatar for ron_e

Error directive : Must use STDCOMP.H This error come out when I try to link various .cpp files and a .h file with borland 5.5 any help ???

Member Avatar for Ancient Dragon
0
637
Member Avatar for Jiggle

I'm currently reading through a C++ tutorial, and for the most part it's going great - but I am slightly confused about the purpose of 'interface classes', and abstract classes. I don't understand why it is preferable to create a purely virtual base class, only to overwrite all of the …

Member Avatar for Sky Diploma
0
132
Member Avatar for Leppie

I am creating an RPG with an in built clock, incrementing after every four moves. The clock is accessible by typing "time" to display the game time. I've also put in "sleep" which increments game time by 4 hours (time and sleep as inputs will not increment game time). It …

Member Avatar for Sky Diploma
0
158
Member Avatar for SCass2010

Hi everyone (again!!) Sorry for all the questions, but I was wondering if anyone could help me a bit.... I jknow a bit about passing command line parameters when running a C++ app on Ubuntu through the terminal. At the minute I have the app either running with no command …

Member Avatar for SCass2010
0
251
Member Avatar for cppdeveloper

[size="4"][size="3"][font="Tahoma"]These are just some of the Arrays sizes i've used, many of them are inside a loop. [CODE] int ss[80000]={0}; char pres[64000]; int ith[4096][16]={0},ich[4096]={0},pres2[2500][16]={0}; int slf[4096][16]={0},slr[4096]={0},rh=0,crs[4096]={0},cri=0,moo=0,nb=0; int qlf[4096][16]={0},wlf[4096][16]={0},kd=0; int jlf[4096][16]={0},jlr[4096]={0},jrs[4096]={0},jri=0; int klf[4096][16]={0},klr[4096]={0},krs[1204]={0},kri=0; int vlf[4096][16]={0},vlr[4096]={0},vrs[4096]={0},vri=0; int plf[4096][16]={0},plr[4096]={0},prs[4096]={0},pri=0; [/CODE] 80% of the time my program runs properly but every other time it …

Member Avatar for raptr_dflo
0
164

The End.