49,755 Topics
| |
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.. … | |
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 … | |
[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++) … | |
| 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" ; … |
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 … | |
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", … | |
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 … | |
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 … | |
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; … | |
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] … | |
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 … | |
| 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] … |
[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: … | |
[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 … | |
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] … | |
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 … | |
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! | |
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 … | |
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 … | |
Im new in C++. Please help me for using C++ from basic. What should i do ? | |
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 … | |
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 … | |
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 … | |
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 == … | |
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 … | |
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 … | |
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 … | |
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] | |
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> … | |
[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 … |
The End.