18 Topics
|
|
hi there, I'm coding in windows, c++, but when I traslate my code to ubuntu, g++, I get this error: [B]lvalue required as left operand of assigment[/B] This is the line where I get the error: [COLOR="Red"][/COLOR][CODE]&*raiz=&*p;[/CODE] What could be the problem? *raiz and *p are pointers to an avl … |
|
I'm reading 'C++ For Dummies 7th Edu' and I'v ran into this little snipet that's confusing me. BOOK You can add const-ness, however, as in the following void fn(char* pName) { // declare following is allowed even though // declared Student(const char*) Student s(pName); // ...do whatever... } The function … |
|
I hot the following program from the book 'C++ For Dummies' but have two questions about it. First I compiled the program but I'm afraid to run because the memery created from the heap does not appear to me to get de-allocated. Am I correct in not wanting to run … |
|
Linux Mint 17 I have recently download the SFML library but I don't know where to put the files. There is a lib directory and an include directory. The lib directory appears to have a lot of sym links in it. garrett@mint-desktop ~/Desktop/SFML-2.3.2/lib $ ls -l total 904 lrwxrwxrwx 1 … |
|
Consider the following code: #include<stdio.h> #define msizeof(type) ((char*)(&type) - (char*)(&type - 1)) int main() { int x; printf("%u %u\n", msizeof(x), sizeof(x)); return 0; } The Above code when compiled with g++ compiles just fine and works well without any wanrings, while in gcc it gives the following warning: `integer overflow … |
|
Hi)I've been using Codeblocks for a long time;since I configured the Toolchain executables shortly after installing I had no problems with compiler;but now when I try to compile a program, codeblocks responds with a statements about wrong compiler path;when I try to run a program it responds with "Target uses … |
|
iam trying to optimize a code i want to run code for arm_no=1000, its running for 100 arms but further increasing causes segmentation fault core dumped. to run the code use $ g++ Epsilon_greed.cpp -lm `gsl-config --libs` $ ./a.out but you'll have to install libgsl0 i.e gnu scientific library. #include<stdio.h> … |
|
I have several files to include from a subfolder and I just can't get this to work. I'm propably missing something here... The Makefile and .cpp with main function are located at /path/to/ and files to be included are at /path/to/src/buffer and /path/to/src/hash. Both of these folders have .cpp and … |
|
Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include … |
|
Hello everyone, I am working my way through the Forger's Win32 tutorial and am on the "Creating a Simple Application" part currently. I am using C++ (instead of C in the tutorial) and the WinGW compiler. When I compile the below code I get this error: main.cpp: In function 'LRESULT … |
|
So, I just did a fresh install of ubuntu 11.10, and am in the process of reinstalling gsl. For some reason, my old make file seems not to work, and am trying to figure out how to change it. Last time I had a similar problem, people in here were … |
|
Hey all! I was thinking about how to make a program, in which you write some c++ code and program tests that code with given examples. For example you input following code in that program: [CODE]#include <iostream> using namespace std; int main() { int a, b; cin >> a >> … |
|
How do I do assembly code with the mingw-g++ compiler. All the websites I checked say that this should work: [CODE]int add(int a, int b) { int c=0; asm("mov %[aVal],%eax;add %[bVal],%eax;mov %eax,%[cVal]" : [cVal] "=i" (c) : [bVal] "i" (b) : [aVal] "i" (a)); return c; }[/CODE] But instead I … |
|
I haven't coded something this complex in C++ before and I haven't had time to really review. I'm making a game (well, foundations for a game anyway), with an external game library, Allegro. But I think the problems I'm having is more fundamental to C++ in general. Included is a … |
|
Hi.I get the following error "g++: error: CreateProcess no such file or directory" whenever i try to compile a program.I have installed the MinGw 7.2 version at work on a windows machine and the problem does not occur , however after installing windows SP3 on my home computer i get … |
|
Hi. I'm making small application what will do c++ programs compiling easier. I have this code: [CODE]System.Diagnostics.Process.Start("C:\\Alps\\compiler\\H-i586-cygwin32\\bin\\g++.exe", "-c Main.cpp -o main.o ");[/CODE] This code should start [CODE]g++.exe[/CODE] with arguments [CODE]-c Main.cpp -o main.o[/CODE] for compiling main cpp file to o file. Can you see any error in my code? Why … |
|
[IMG]http://i1187.photobucket.com/albums/z394/crazythang/photo-1.jpg[/IMG] i try to compile a simple c++ hello world, and i get this, PLZ HELP i compile with g++... |
|
I'm using a cross-compiler that generates MIPS binaries from c++ (mipseb-linux-g++). What I want to do is tell the compiler to use a specific ISA (namely MIPS I). From what I can tell this is a machine option that should be easily configurable. I've tried changing the option in my … |
The End.