General C++ Programming - May 2017 (Page 5)

Get typename of a variable without any common libraries?
 
This may be asking much, but is it at all possible to get the typename of a variable without using common libraries? The reason is that I am writing an OS, and ...
[1 reply] : No. #include <typeinfo> is required if we want to use the typeid o... (by JLBorges)
To Find Large Powers in
 
Hi guys, I have two numbers A and B where both can be in the range 0-100000. How can we find the value of A^B without using non standard libraries as GMP o...
[1 reply] : what is the actual c++ type of A and B? does the pow() function work?... (by jonnin)
by Azard
Printing text from text
 
Hello people ! I have a problem with a exercise I have to end. I have been searching for long so I finally ask for your help... I must write a program tha...
[5 replies] Last: Thanks you ! Problem solved with this (by Azard)
simple linked list - class node
 
Here is the problem I am trying to figure out, and please let me know if I am understanding the question correctly: Create a simple linked list to create a cla...
[no replies]
by jdeep
Temp Converter
 
write a program that creates and displays a table of temperature conversions. Get the starting temperature from the keyboard in degrees Celsius (do not allow in...
[8 replies] Last: cout << x << COLUMN_SEPARATOR << toFahrenheit << COLUMN_SEPARATOR << ... (by chicofeo)
Knight's tour using recursion and backtracking
 
Hey guys! I am writing a program to trace a knight's tour on a chess board using recursion and backtracking. The task is to make the knight travel through all ...
[4 replies] Last: The scope and duration of these variables are somewhere between lines... (by mbozzi)
by SidV
How can I pass .txt file to an array?
 
Write a program that asks the user for the name of a file. The program should display the last 10 lines of the file on the screen (the "tail" of the file). If t...
[2 replies] Last: Yes we are allowed to use vectors I'll give it try and see if I can ge... (by SidV)
by jdeep
Simple Calc
 
Write a simple calculator program that allows input of two integer operands and outputs the result of all five arithmetic operations (+, -, *, / , & %). Modular...
[4 replies] Last: #include <iostream> #include <cmath> // accept an integer from stdin ... (by jdeep)
What's wrong with my Caesar Encoding-Decoding Code ?
 
#include <iostream> #include <ctype.h> #include <conio.h> using namespace std; string caesarEncoding(string message,int k) { for(int x=0;x<message.length();x...
[3 replies] Last: The -- message ; is just the applying of a -1 key to message . At e... (by nuderobmonkey)
vector of struct vectors
 
I am making database management program for homework using the vector library and I keep getting an error when I try to use a vector of struct vectors. Is this ...
[5 replies] Last: Oh. That makes sense. Thank you! (by matthubb)
by Kalcor
Trying to understand this binary search
 
.
[2 replies] Last: I wouldn't be asking if I knew :c Also, I commented the code a bit. (by Kalcor)
by Kalcor
Binary search not computing
 
Hello, this was a binary search question I am trying to solve: https://community.topcoder.com/stat?c=problem_statement&pm=3561&rd=6519 I implemented this code:...
[2 replies] Last: @ne555 what's wrong about them ? (by Kalcor)
by Kalcor
Difference between 2d array passing and 1d array passing
 
Why when passing 2d arrays to functions let's say that's the func int foo(int a ) and if I pass an array of it would give me an error BUT if i...
[2 replies] Last: Thanks <3 (by Kalcor)
Analyzing Videos Via C++
 
I am pretty new to programming but I recently discovered an interest in hawk-eye technology and began researching how exactly it worked. I realize that as a beg...
[3 replies] Last: So for a baseball you know it's white and it's size. There will be lot... (by SamuelAdams)
How to create a function that accepts different sizes of a 2d array
 
I was creating a project and wanted to create a function that accepts 1 2d array of different sizes and a integer to specify its size but it didn't work. I woul...
[2 replies] Last: you need the rows, cols, and data regardless, which begs a struct or c... (by jonnin)
Combining Struct and Stack
 
So I have made a program for schoolwork which is supposed to be a bookshop's stock program. The program ought to have Struct, Stack, Pointer, Array, and a Searc...
[3 replies] Last: It's still not clear where the stack fits in. In main you create an ar... (by Thomas1965)
by Kalcor
Getting this binary search method.
 
Tried so hard to use normal binary search on this question but it just fails every time lol, so I looked this one up and I had everything the same except for so...
[2 replies] Last: @doug4, the solution works well but i am not confused about the binary... (by Kalcor)
Define a function "foo"
 
Rearrange the code to define a function"foo", wich throws an exception with a value of "100" if its parameter is greater than 999. The "foo" catches its excepti...
[4 replies] Last: did he really just gave a coding puzzle? xD (by EnderBoy)
by stav
cant change opengl sdl double buffering attribute
 
bool InitGL(SDL_Window* window) { SDL_GL_CreateContext(window); int test; SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &test); cout << test << endl;...
[1 reply] : Why don't you check the return value from SDL_GL_SetAttribute ? (by Thomas1965)
by vibhu
how to release memory allocated
 
hi, the below program is working fine but it has multiple memory leaks , please help from where should i release the memories allocated.note- memory is allocat...
[4 replies] Last: @mbozzi (907) highly appreciate your efforts. (by vibhu)
May 2017 Pages: 1... 34567... 14
  Archived months: [apr2017] [jun2017]

This is an archived page. To post a new message, go to the current page.