So my next problem is what mac is right and reliable for me? I will be using my mac for: - Writing word/pages docs - Programming in C++ , Objective-c , Java and more - Game development - Powerpoint/keynote presentations - A little bit of PhotoShop - Music and personal uses - A little gaming on steam So what mac is right for me, the most things I will be using on my mac is programming, Game development , Presintations , word processing and daniweb. Please answer as fast as you can , my budget is 1350$.

Member Avatar
Member Avatar
+0 forum 12

When I try to compile the program below in Eclipse I get two erros, ‘const class Fraction’ has no member named ‘n’ & ‘const class Fraction’ has no member named ‘d’ When I compile it on the command line with g++ -Wall FloatFraction2.cpp Fract7.cpp -o FloatFraction I get more errors than I care to look at. I copies this code straight from my book (C++ Without Fear 2nd Edition) so I don't understand why it wouldn't work. FloatFraction2.cpp #include <iostream> #include "Fract.h" using namespace std; class FloatFraction : public Fraction { public: double float_val; // Inherifted constructors: with C++ 0X, …

Member Avatar
Member Avatar
+0 forum 2

Authors of PVS-Studio static code analyzers offer programmers to test their sight and to try finding errors in C/C++ code fragments: https://software.intel.com/en-us/blogs/2015/04/24/lets-play-a-game-find-bugs-in-popular-open-source-projects

Member Avatar
Member Avatar
+0 forum 1

Hi guys, Tomorrow is my theory paper exam of C++ OOP and Data Strucutre. Paper will be based on 50% theory Q/A and 50% on coding implentaion. Can you give me some hints to prepare for this coming exam? PS. I have gone throw all lectures slides and course material, but you know what I am asking for, how can I prepare my se;f to do 100% job? Thanks, Regards, Umer Jamil.

Member Avatar
Member Avatar
+0 forum 1

This is a basic CPP sleep fuction. As you can see CPP libs do not come with a time sleep/wait fuction to use in your code/loop. So due to boring jurney to Saint Petersburg, i decided to write something/code to give anyone who has been wondering why CPP does not consist of that function. The idea is nice because there are at least 5 ways to achieve this results. I always like the easy and straight forward ones. Have a look at the code below. I will starting a QT GUI full tutorials in the next few days. Everything QT …

Member Avatar
Member Avatar
+0 forum 12

Hi guys, I'm working on a side project for a friend and I'm looking for a C++ library that allows me to put bunch of paragraphs in a PDF format. Anyone know any good libraries that can do this as simply as possible? It will be just paragraphs and paragraphs that need to be added to a pdf with normal margins and Times font! I'm looking for a library that I can use quick so I won't have to spend much time on this... not too familiar with this area that's why I'm hoping one of you has done somehting …

Member Avatar
Member Avatar
+0 forum 4

Hello, my name is David, and I want to create a program that will take an audio file, generate the WMP visualizations, apply some modifications, and save it to an AVI file. How can I do that? Thanks in advance (-:

Member Avatar
Member Avatar
+0 forum 2

Hi All, Could you please clear my doubt why this second catch block is called when exception is thrown only once. #include <iostream> using namespace std; class E { public: const char* error; E(const char* arg): error(arg) {} }; class B { public: B() {}; ~B(){cout<<"~B() called"<<endl;} }; class D: public B { public: D(); ~D() { cout<<"~D() called"<<endl; } }; D::D() try :B(){ throw E("Exception in D"); } catch(E&e) { cout<<"D()"<<e.error<<endl; }; int main() { try { D val; }catch(...) { cout<<"Last"<<endl;} }

Member Avatar
Member Avatar
+0 forum 1

why does code 1 gives segfault error whereas code 2 doesn't, both are basically same, do anyone have any suggestion? 1. #include <iostream> using namespace std; template <class T> class nodes { template <class U> friend class linklistchain; private: nodes<T> *adrs; T data; }; template <class T> class linklistchain { private: nodes<T> *first,*last; public: linklistchain(); ~linklistchain(); bool isEmpty(); bool insert(const T &x); }; template <class T> linklistchain<T>::linklistchain(){ last = NULL; } template <class T> linklistchain<T>::~linklistchain(){ delete last; } template <class T> bool linklistchain<T>::isEmpty(){ if (last) { return true; } else { return false; } } template <class T> bool linklistchain<T>::insert(const …

Member Avatar
Member Avatar
+0 forum 2

I have a project and a part of it is related to sha 1 encryption using openMP. Any help would be highly appreciated.

Member Avatar
Member Avatar
+0 forum 3

Hey everyone I was working on a small tool and also refreshing my programming skills. my problem is I want to pick a random number from 60,000 to 200,000. it does that but the number it displays are not dramaticly changed. For example if it out puts 062045, i hit enter to do my while loop to reset it again and it moves up to like 062049.... i want it to go like if at one point its at lets say 62353, then i press enter to run again my while loop and it should change dramatically and maybe go …

Member Avatar
Member Avatar
+0 forum 5

cpp programs

Member Avatar
Member Avatar
-2 forum 4

Hi, I have a function which returns a pointer to array with data: `float * EZ_MATH::EZ_GE_BY_ME() { ... }` Now, how can I access this data? This doesnt work: `float * memA = temp_m.EZ_MATH::EZ_GE_BY_ME();` `ofstream output("out_file", ios::out);` `output << memA[0] <<endl;` `output << memA[1] <<endl;` Help!

Member Avatar
Member Avatar
+0 forum 3

Alright. I am making some decent progress here. I am trying to add a toolbar to my basic text editor that I am making using an internet tutorial. Anyways the problem is that I can get the bitmaps to display but they appear to be just that... bitmaps. When I click on them, the edit window overrides and I can type text in and just generally not interact with the buttons. Anyways, here's the main body of code, the menu and the header contents: Main: #include <windows.h> #include <Commdlg.h> #include <commctrl.h> #include "Header.h" const char g_szClassName[] = "myWindowClass"; HWND hEdit; …

Member Avatar
Member Avatar
+0 forum 3

Hey everyone need some help again with finding the min and max from a text file. its my college lab assignment. here is my code till now. #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout; fout.open("Text.txt"); ifstream fin; fin.open("Lab6.txt"); float c; int count = 0; float sum = 0; float mean = 0; float min = 0; float max = 0; float range = 0; //<<<<<they al have to be float because the text file has float numbers>>>> while (fin >> c) { count++; sum += c; mean = sum / count; } cout << "Total …

Member Avatar
Member Avatar
+0 forum 6

So basically I am new to API programming and teaching myself. I've done a bit of console C++ that I got off of.... an internet tutorial. The story is the same here too. I am somewhat aware of what the lines of code do, though I am not yet a dictionary so please if anyone wishes to help, keep that in mind. Onward to the problem --> I am trying to make a dialog box show up when I click on one of my menu options. Curently the menu option I chose is "Blurp"-->"Go" When I compile and run the …

Member Avatar
Member Avatar
+0 forum 7

I am currently in an introductory c++ class and am working assignment that sorts data. We recently covered structs and I decided to use structs to approach the problem rather than create 3 arrays to hold the information from our data file. The trouble i'm having is when i'm trying to pass my struct to my function. Here is my error: analyze_data.cpp: In function ‘int main()’: analyze_data.cpp:76: error: conversion from ‘weather*’ to non-scalar type ‘weather’ requested analyze_data.cpp: In function ‘int find_pos_of_smallest(weather, int, int)’: analyze_data.cpp:110: error: no match for ‘operator[]’ in ‘data[pos]’ analyze_data.cpp:110: error: no match for ‘operator[]’ in ‘data[pos_of_smallest]’ I …

Member Avatar
Member Avatar
+0 forum 1

Hi guys I been programming in c++ for past 2 years and is fairly good with it. First of all I dont need the code or anything but need some resources which i can use to get the basic idea so I can start developing. Had been googling for the past few hours nothing much turned up on this topic especially because I am working on Linux environment and not need to buold this from the scratch than using and api. Need a few resources that can explain which libraries to use, how to buffer and use a codec and …

Member Avatar
Member Avatar
+0 forum 5

Hi! I'm new in this forum. I was reading some other posts about Directx and so. Now I have a problem with Lightning in Directx. I wanted to do some graphics like minecraft's ones, with cubes. And when I got my cube class ready, i drawed one cube and that happend: ![box1](/attachments/small/3/box1.jpg "align-left") I have SetRenderState(D3DRS_LIGHTING, FALSE) set, so i dont know why this happens... Can someone help me? Why could this happen? Thanks!

Member Avatar
Member Avatar
+0 forum 1

Hi I would like to make cgi-bin program which will make dynamic pictures. I know how to make cgi program which would output simple html file #include <iostream> using namespace std; int main(int argc, char* argv[]) { cout <<"Content-type: text/html\r\n\r\n" << endl; try { cout<<"<html><body><h1>Test</h1></body></html>"<<endl; } catch (exception e) { cout<<" Nemorem prikazati slike."<<endl; } return 0; } So how should I change this program that insted of html page I would output a jpeg image? First I have to change frst output to: "Content-type: Image/jpeg\r\n\r\n" After that ...

Member Avatar
Member Avatar
+0 forum 2

Hi, i'm programing in CodeBlocks (http://www.codeblocks.org/). I would like to add Dlib (http://dlib.net/) library to my project. How can I do this? I went to my project "Build options..."->"Search directories"->Compiler and added path to "dlib" folder. I did the same for "Linker" and "Resource compiler" (more info abaut adding libaries http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)) I copied code from this page http://dlib.net/image_ex.cpp.html and I got errors. After that I copied dlib folder inside project and now my proyect can find dlib library. :) But I still have some errors. C:\Projekti\SlikaCGIbin\main.cpp|68|undefined reference to `dlib::base_window::set_title(std::string const&)'| C:\Projekti\SlikaCGIbin\main.cpp|75|undefined reference to `dlib::base_window::wait_until_closed() const'| C:\Projekti\SlikaCGIbin\main.cpp|76|undefined reference to `dlib::base_window::wait_until_closed() const'| …

Member Avatar
Member Avatar
+0 forum 2

I am trying to run an easy Android ndk app in cpp, but I get UnsatisfiedLink Error for the Generate() function. Any help would be appreciated. I am quite fluent in c++, but my java is a little bit rusty. I have been trying a lot of tips from the web concerning naming, but so far no luck. Here are my files: native.cpp: #include <string.h> #include <jni.h> jstring Java_com_optimuse_app_OptimuseAppActivity_generate(JNIEnv* env, jobject thiz){ return env->NewStringUTF("Hello from JNI !"); } Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := native LOCAL_SRC_FILES := native.cpp include $(BUILD_SHARED_LIBRARY) I compile this with ndk-build and all …

Member Avatar
Member Avatar
+0 forum 1

I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is there anyway to remove the DOS prompt? I will include the code, so that you can see what I mean. #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int …

Member Avatar
Member Avatar
+1 forum 5

I need help in running a program that makes a SLR Parser Table. Here is the code : Code to find first and follow: saved as SLR.h #include<stdio.h> #include<ctype.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<iostream.h> #define epsilon '^' // since I didn't know how to type epsilon symbol temporily I am using ^ char prod[20][20],T[20],NT[20],c[10][10],foll[10][10],fir[10][10]; int tt,tnt,tp,a; int follow[20][20],first[20][20]; void first_of(char); int count(int j); void rhs(int j); void read_tnt(); int rhs(int j); void read_tnt() { cout<<"For SLR parser: "; cout<<"\nEnter number of terminals: "; cin>>tt; cout<<"\nEnter terminals: "; for(int i=0;i<tt;i++) T[i]=getche(); getch(); cout<<"\nEnter number of Non-terminals: "; cin>>tnt; cout<<"\nEnter Non-terminals: "; for(i=0;i<tnt;i++) …

Member Avatar
+0 forum 0

I need helping trying to retrieve data held in a [CODE]std::list<boost::shared_ptr<boost::any>>[/CODE] I am working on a Singleton Controller class with a private [B]std::list[/B]. Client class(es) will be able to [B]Add/Remove/Edit[/B] concrete class objects to be used by the program through this Controller class. The reason for using [B]boost::shared_ptr[/B] is because I assign a unique objID to each concrete class created. Once instance objs are added to controller, user will be able to search and remove objs later. The [B]Add(....)[/B] and [B]Remove(...)[/B] overloaded methods for each concrete class work fine. I am now trying to create [B]getObject(int index)[/B] and [B]setObject(int index)[/B] …

Member Avatar
Member Avatar
+0 forum 2

Looking for an equivalent container class that matches to C#'s Arraylist collections class. Is there anything that comes close to a container that can provide index based enumeration as well as hold multiple data types. I am trying to create an vector that can hold multiple data types. For example: [CODE] //Is this line of code possible?? vector <int, string> vec; int i=0; string str = "test"; //add different data-type objs into my vector mutable array vec.push_back(i); vec.push_back(str); [/CODE] Please advise, if there are other container classes in C++ that might help me achieve this functionality or there is a …

Member Avatar
Member Avatar
+0 forum 4

Need help with implementing a pure abstract class via inheritance, using namespace to wrap all my classes to avoid conflict with others. I have been able to build and run the code successfully if I remove namespace wrapper from my abstract class and all classes that inherit from my pure abstract class. It seems like Visual Studio 2010 compiler is complaining that despite all classes are in the same namespace, the abstract class's pure abstract method is not implemented. Any help would be much appreciated. [CODE] //IBaseClass.h //namespace MyCustomNamespace //{ class IBaseClass { public: virtual ~IBaseClass() { /*virtual destructor*/ } …

Member Avatar
Member Avatar
+0 forum 8

Hello, guys. I made a program to compare numbers, Example input: [QUOTE] 1 3 10 845157 2 1101101 16 5AE12 [/QUOTE] It transfers numbers from different number system to decimal, then it compares them, but it is not so fast as i need, maybe just a little advice needed, I really dont know, I've tried all i thought... [CODE] #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> using namespace std; int main(void) { int poc,u,j,x,max,maxi; char pov[35001][31]; // store for numbers from input scanf("%d",&poc); // Number of tasks while (poc--) { scanf("%d",&u); // Amount of numbers coming from input int k=0,des[u],sus[u]; // sus - …

Member Avatar
+0 forum 0

Hi everyone, I haven't really found much here on how to input into functions and I'm looking for more information on it. Basically my problem is this: I have to make a function that calculates feet into yards, and I'm trying to find out how to make it so I can have the prompt me to enter a number and then when I enter it run the function and print it out. I will also then have to have it prompt if I want to do yards to feet or feet to yards and then calculate it. But, mainly looking …

Member Avatar
Member Avatar
+0 forum 1

Hi there, I am trying to compile devcpp project that contains one source file helloworld.cpp [CODE] #include <iostream> using namespace std; int main () { cout << "Hello World!"; system("PAUSE"); return 0; }[/CODE] I get this error: [ICODE] C:\Dev-Cpp\Makefile.win [Build Error] [helloworld.o] Error 1 [/ICODE] Compile log is as follows: [ICODE] Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe -D__DEBUG__ -c helloworld.cpp -o helloworld.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 -g3 g++.exe: helloworld.cpp: No such file or directory make.exe: *** [helloworld.o] Error 1 Execution terminated [/ICODE] Does anyone know what is …

Member Avatar
+0 forum 0

The End.