Newest 'codeblocks' Questions - Stack Overflow

Questions tagged [codeblocks]

This tag is for Code::Blocks, an open-source C++ IDE. Do not use this tag for code blocks which define scope (e.g. curly braces).

1
vote
1answer
48 views

No file or directory found

I downloaded Code blocks 17.12 and then followed:- new project:-console application:-c++ Now when I write the following code it does not run:- #include<iostream> void main() { std:: cout&...
-2
votes
0answers
35 views

is there any bugs in codeblocs mingw compiler [duplicate]

i have issues of some per-increment of the values in c programming when i tried to pre-increment answer came is wrong values alwas increment by 1 i tried use a =0 but answer is wrong i tried use ...
0
votes
0answers
44 views

Not able to debug C program in code blocks

Not able to debug C program in code blocks (ver 17.12) in windows10. Search the other answers also, but none of them seem to help. I have "-g" option enabled in the compiler settings. When put a ...
0
votes
0answers
8 views

How to add Google font in Codeblocks?

I want to add Source Code Pro in Codeblocks. I download it and it was saved in Control Panel\Appearance and Personalization\Fonts. I wanted to how can i add it to codeblocks after selecting "show more ...
0
votes
4answers
37 views

End a while loop that continue ask for string input until I enter -1

I have to create a menu that holds item names, I can do it with a for loop that ends until the max has been reach, but how do I do it with a while loop that will continue ask until the max is reached ...
0
votes
2answers
32 views

“… && … || …” (short-circuiting boolean) not identical to “if …; then …; else …; fi” [duplicate]

I have just had unexpected result from writing the alternative form of if/then/else blocks. > #this is the behaviour I expect: > if [[ 1 -eq 1 ]]; then echo "good"; false; else echo "bad"; ...
0
votes
0answers
28 views

Codeblocks C Debugging

I've got a new challenge to return the factorial of a number. Got ideas on how to do this, but the challenger has given some starting code - which is shown below. Now this isn't how I would have ...
0
votes
1answer
50 views

Changing a DLL while a program is running

I have been wanting to make a game in C++ about programming little ships to fight together. One of the things, though, is I wanted to be able to edit the game while it was running, instead of having ...
0
votes
0answers
77 views

Comparing Objectnames in c++? [closed]

I want to compare two object names so that if I create two Objects "Spiders" from class Insekten I want in the method paarung() that output will be "Spider will eat the partner". I tried that in ...
1
vote
2answers
42 views

I'm getting a conversion error in my C++ solution for TSP

I am attempting to solve TSP in C++ with a multidimensional array and am receiving an error message about type conversion. I've gotten rusty on C++ having not used it in a few years, so to relearn I ...
-1
votes
0answers
25 views

How to fix codeblock compiler & debug?

I install Code block, but I can't Debug. I search in google, I find I need MinGW and install gdb and ect, next config the IDE. I done,but now, I can not do any, debug and compiler. I need help. I ...
0
votes
0answers
75 views

How to fix “begin is not a member of std” error message [duplicate]

#include <algorithm> #include <iostream> #include <iterator> #include <vector> int main () { int a[] = { 1,2,2,2,3,5,6,6,7,8,8 }; int b[] = { 1,3,5,7 }; std::...
-4
votes
2answers
51 views

How to compare an element of array with all the elements of another array

I have 2 arrays : a [ ] = {1,2,3,4,5,6} and b [ ] = {1,2,6}. How can I compare all elements from array a with all from array b. For example, I compare the first element from a with all elements from ...
0
votes
0answers
9 views

How to fix endless “checking whether stripping libraries is possible” when installing gmp with Mingw32

I'm trying to install GMP on my CodeBlocks application using MINGW32. For this i use the command : ./configure *--prefix=/c/"Program Files (x86)"/CodeBlocks The configuration advance until the step "...
1
vote
0answers
34 views

wxFrame with Codeblock - unavailable blocks within second wxFrame

I've got one question about wxSmith while worikng with CodeBlock. I've create application that can do simple signal processing. For a while now, I've only been using only one wxFrame called "...
1
vote
0answers
44 views

Why Does my 'Cout' Statement Print Something Random [duplicate]

I don't think there is much context needed for this question, so I exclude the rest of the code that I think is irrelevant. I type the code below and yet the console prints: "ü vaqB A". So the console ...
-2
votes
3answers
33 views

Program Not Finding the Header File in my C++ Workspace

I am very new to C++ programming and have been following the C++ Primer 5th Edition book. There is an exercise requiring an object 'Sales_item' which is provided as a header file. The link had expired,...
0
votes
0answers
33 views

WxWidget - Problem with wxFrame itself - is it possible to copy an element from one wxFrame to another

The task is simple - Is it possible to copy one element from wxFrame, for example wxButton to another wxFrame that has been created later on ? I've tried from simplest solution like "Ctrl + c", up to ...
1
vote
0answers
42 views

Fix 'no matching function for call to …' error?

I'm trying to run this .cpp file in Codeblocks (only change is adding #include for windows.h to beginning). It uses OpenGL, GLUT, and GLUI. I think I've gotten OpenGL and GLUT to work in Codeblocks ...
-1
votes
1answer
45 views

What is error (0xC0000005) and how do I fix it? [duplicate]

I am new to coding, so I am simply trying to create a function that allows the user to create a two-dimensional array by specifying the number of rows and columns and the content of the array elements....
-4
votes
2answers
36 views

How to pass a pointer through a function that operates on the pointer with a non-pointer argument?

I am just starting to learn C++ on Code::Blocks and am doing an exercise with dynamic memory allocation via the new and delete operators. The main function allows the user to request memory for ...
0
votes
1answer
61 views

Fuction is printing my char far away from where it's supposed to be

I'm doing a card game for my college and I decided to do the card's design using the ASCII table. I made one function that prints the suits of the cards using Unicode since I couldn't print them just ...
0
votes
1answer
34 views

Why are there errors while opening code::blocks exe file? [closed]

I finished my little project on the IDE codeblocks, now I want to open the exe file, I added the SFML DLLs, but when opening, this happens: Procedure entry point ...
1
vote
0answers
33 views

Process terminated with status -1073741510 Error

So I decided to learn C on my own and was using CodeBlocks and decided to try out a basic program that asks to enter two integers then prints out the sum but CodeBlocks keeps giving me an error that I ...
-3
votes
0answers
29 views

Same program with different outputs in C (Inc/Dec) [duplicate]

Actually I am getting different values of a program in turboc3 and Codeblocks. I don't know the concept of Codeblocks. Please help? I have tried online compilers, documentations, try to crack the ...
0
votes
3answers
32 views

build error in code block for function gets

I want to make a simple variable for number of the round for a loop, so I tried my code int size,counter,marks[size]; scanf("enter %d/n",&size); for(counter=0;counter<size;counter++) { ...
1
vote
0answers
57 views

Link assembly function (.o) in c file

I want to use my .asm function inside C code. So I compiled my fun.asm file to fun.o and linked that object file in CodeBlocks. (I assume that linking is working because if I delete .o file then ...
0
votes
1answer
18 views

Could not start D-Bus. Could you call qdbus?. Nothing helped, any ides how to fix it?

I installed CodeBlocks from terminal with command sudo apt-get install codeblocks on Kubuntu 14.04 and then file manager started lag. I restarted computer and had error "Could not start d-bus. Can you ...
0
votes
1answer
37 views

warning in codeblocks, “operation may be undefined”

I get a warning, not an error, and when I ignore the warning and build/run anyway, my code seems to be working just fine. I am still worried, though, because of the warning, or maybe I just want to ...
0
votes
0answers
22 views

How to fix the Conditional Operator Overloading in c++ when the overloaded operators are not giving the results accordingly for Rational Number Class? [duplicate]

I am a student of c++. I learned overloading of Operators quite recently. So, I was making a class Rational, to deal with arithmetics and logics of Rational Numbers. I made overloaded operator ...
0
votes
1answer
61 views

what is actual value of variable t of type size_t when it is assigned negative value?(can be unsigned int instead of size_t)

Assigning -1 to variable t of type size_t and checking it's equality with both -1 and 4294967295 (FFFFFFFF, 2's compliment of -1; my system is 64 bit;value may vary with system), then in both the ...
-2
votes
2answers
45 views

C++ winsock server accept function returns 10022 error

I got rid of the error, now I seem to be stuck on something else. I have separate Winsock client and server programs on Code::Blocks. I'm trying to send a message from the client to the server, but ...
-1
votes
0answers
35 views

Why does an empty getter returns something in one method but not in the others? [duplicate]

I had an issue in another post that showed I had not written my getter fonction. Yet the code was partially working. I reproduced a smaller example below. I have no idea why my empty getter fonction ...
-2
votes
2answers
24 views

How to fix the problem of opening an .exe file wich flashes(closes instantly after the program's end)?

I've been coding for a while with codeblocks and I've coded some C programs. In my project folder of my programs there is the .exe file that I used to click on and get it's console output. But today ...
0
votes
0answers
30 views

Why I can't build in Code::Blocks with ANTLR4? [duplicate]

I follow the instructions for this site: https://github.com/antlr/antlr4/blob/master/runtime/Cpp/README.md for use antlr4 in C++, I installed the runtime no problem with this. Next, I created a ...
0
votes
0answers
43 views

Crash while executing python script via c++ program

i'm using code::blocks v16.01 on windows 10. trying to execute a python script i wrote (v3.7.3) from my c++ program through the python api. i can see the script does run independently, but running ...
1
vote
2answers
75 views

Why 2 is not smaller than 10 on Codeblocks?

I just worked to my final exam with simple codes; when I try to sorting strings, I face annoying error. Why 2 is not smaller than 10 on my CodeBlocks IDE but is smaller than 10 on real and onlinegdb....
-2
votes
1answer
58 views

Program doesn't return 0, “this hasn't been built yet” pops up infinitely

I just downloaded CodeBlocks and made my first console application, and I have mingw installed but I tried running the default code and the popup "it seems this project has not been built yet. do you ...
0
votes
0answers
38 views

Trouble with the movement function for 2048

Working on a project for my coding class, but I'm just very confused on how to go about the movement for 2048. certain parts work, while others cause the top right block to become a very large string ...
0
votes
0answers
64 views

What is the “debugger finished with status 1”

I defined "true" gdb.exe from minGW folder to Settings > Debugger Settings > Executable Path so, debugging problem is solved. I'm writing something like 2D Particle Simulator for homework with C and ...
0
votes
1answer
32 views

Undefined reference to 'addVectors(Vector,Vector)'

I can not solve these "undefined reference to" problem. There error could be in my header file. my IDE is CodeBlocks #include<windows.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #...
0
votes
0answers
30 views

undefined reference to zmq using Code::Blocks

There are several answers on the internet that I've found regarding this matter, but none of them worked for me(I am using Windows by the way). this is the hello world server example from zeroMQ's ...
1
vote
0answers
17 views

Codeblocks debugger failed

I have ust started using debugger but it shows this error on pressing move to cursor on codebocks. Active debugger config: GDB/CDB debugger:Default Building to ensure sources are up-to-date Selecting ...
0
votes
0answers
12 views

Codeblocks builds and runs wrong file

I have only one project open in Codeblocks. It has two files. When I try to Build or Run Codeblocks it builds and runs a file from another project. I have gone so far as to rename the source file in ...
0
votes
1answer
27 views

getting errors when trying to run a Codeblocks program

I've just downloaded code blocks and im trying to run a program but it doesnt work. It says : Project/Target: "o g l - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so ...
0
votes
1answer
19 views

Get datas from TXT to a matrix

I have a homework to make a file like this, License plate, date, time, speed like: AAA-111, 2019.01.01, 12:12, 50 I have to read these into the program and check if how many cars went there at the ...
0
votes
0answers
11 views

How do i make a include python.h in codeblocks for python to call in c

I dont know how to include python.h header in codeblocks so i can call it in python, can anyone tell me how? i have tried #include <Python.h> but it came up with an error #include <Python.h&...
0
votes
0answers
4 views

How can I have multiple workspaces in CodeBlocks

I am using CodeBlocks and want to have many workspaces not only the default workspace. It is easy to save workspaceses other then the default, but how can I access them.
1
vote
0answers
18 views

how to make a new first block coin in modify bitcoin v18 code

I'm now trying to modify and make my own cryptocurrency by using bitcoin v18 for my base coding. now I have a problem with the first block that cannot create the first block of the coin and this is ...
0
votes
0answers
101 views

My C++ Compiler does not compile an “if” “while”, and “for” statement with a variable declarations in it

I'm currently learning C++17 from the book "C++17 from beginner to professional". In the control statements part of the book, I was told that one can declare variables to be used in an if statement ...