General C++ Programming - April 2018 (Page 11)

dijkstra
 
Given N and an NxN matrix , find the shortest path from (1, 1) to (n, n) example : Input : 3 1 2 5 1 3 1 0 8 1 Output : 7 explanation : 1 (1,1) + 1 ...
[2 replies] Last: thanks (by MattC98)
by ir8o8
Palindromes
 
Hey all, I am doing a Palindrome code and I need some help on my function called int palindrome_fix_location(string) part. A file, called ​data​, contai...
[1 reply] : Hi ir8o8, I'm amazed how useless are those exercices ^_^~ I suppose yo... (by punksheep)
Non-Standard Type Sizes - Networking
 
Hello there! So to clarify the title, it's not guaranteed that an "int" for example will be the same size from compiler to compiler. Of course there are standa...
[1 reply] : Use plain text. When you feel the urge to design a complex binary fi... (by JLBorges)
Leibniz's series pi/4 = 1 - 1/3 + 1/5 - 1/7 + ....
 
Write a program Q3.cpp to compute π by using the following formula. pi/4 = 1 − 1/3 +1/5 − 1/7 +1/9 + ⋯ + (−1)^n/2n + 1 Q3.cpp should meet the following...
[no replies]
include versus library files as cause of error?
 
Compiling I get the following output: x64_MT9V034_vid\Debug/../src/main.cpp:142: undefined reference to `ArduCam_writeSensorReg' \x64_MT9V034_vid\Debug/../...
[7 replies] Last: Right place right time. I'll make understanding this article a mission... (by technologist)
by Pumps
Reading text file into linked list
 
Write your question here. I am working on a program that requires me to read a text file and insert the data into a linked list. I am having difficulty reading...
[1 reply] : Hi Pumps, You were very close ^_^ You just inverted the two vari... (by punksheep)
I got some problem and need some help to finish the homework
 
Write a program Q2.cpp that meets the following requirements. a. Write a function inc()that will increase the value of variable by a specified number. Calling...
[2 replies] Last: Hi johnlai, Your teacher is very strange :P... this exercice teac... (by punksheep)
ANYONE KNOWS THE PROBLEM?
 
Anyone knows how to solve the problem I'm having #include<iostream> #include<cmath> using namespace std; #define PI 3.1415 float menus(); float optio...
[1 reply] : HI Javyesco... Your "option choice" is read into the meN variabl... (by punksheep)
Vending Machine Money Validation
 
Hello, I am working on a vending Machine simulator. I am missing the payment part. What I need is (using bool) a function that will ensure the user can en...
[3 replies] Last: thank you so much for your input. I will continue making those correct... (by Anahuac18)
Exception Handling (Exception keeps printing, ignoring other functions)
 
The primary issue is my exception within my test function continuously prints the exception, but ignores the rest of the functions within the try {}block and pr...
[3 replies] Last: What is the value of size when you call add ? What is the value of ... (by JLBorges)
by tina e
3D Array with multiple values in each cell- please help
 
How can I use objects to create an an array with the dimensions 100x100x100 where each cell contains 35 different values?
[3 replies] Last: You can not define the allocate number 100 multiple 3 times in given p... (by shivkumar12)
Makefile problems with object files
 
I am trying to write a Makefile that will compile an example project. As long as I don't define object files it works, but when I do, compilation stops with a ...
[2 replies] Last: @doug4 Yes, that was the problem, and additionally the different sour... (by G0rdano)
unoriented graph
 
Mark invented facebook, meanwhile some people created friendships, he doesnt want to waste time so he creates a machine which sends a message to people and the ...
[no replies]
quest/wrong
 
i have this quest : https://csacademy.com/contest/round-76/task/candy-boxes/ why is this code wrong? #include <iostream> using namespace std; const int MAXN ...
[10 replies] Last: tl;dr: Your algorithm is faulty. Matt, I don't want you to have a bad... (by dhayden)
Why am I getting garbage values? - Using arrays to calc polynomial roots
 
Hello, I am writing a program that will take coefficients of a polynomial, store them in an array and then using functions calculate the differntial of that p...
[2 replies] Last: Finished it ! Thanks for your help! #include <iostream> #include <... (by Shishykish)
by tina e
Finding the Mean of 4D image using CImg Library
 
Hi! I have an image im(100,100,100,35). This means that it is 100x100x100 in dimensions and each voxel contains 35 values. I would like to find the mean of t...
[no replies]
Weird error when compiling my client
 
Hello everyone, I am new to C++ and learning more about it, grabbed a client for a game from the internet and started to learn stuff. Now I am running in to...
[6 replies] Last: Hey guys ! Both of you thanks for responding and trying to help me sol... (by Ralumbi)
std::future slow
 
Code and tests are here: https://wandbox.org/permlink/WRrexu49nQ5vnGyb Is there a reason for this? I'd expect it to have the same performance as the 2nd test ...
[1 reply] : clang gave me there the less outrageous 34049 17024 37675 19496 https:... (by Cubbi)
Sorting a Map
 
I am attempting to sort a map<string,int> varName i tried using the std sort with the built in iterators std::sort(words.begin(), words.end()); but it...
[2 replies] Last: A std::map is always sorted by its keys, by definition. (by mbozzi)
Tally via Map/ I/O issues
 
I am having trouble getting my head around what exactly i am supposed to do. I am trying to create an input on output method for reading in and writing into fi...
[5 replies] Last: I am ignoring the remove non-alpha right now because the input exampl... (by dhayden)
April 2018 Pages: 1... 910111213... 17
  Archived months: [mar2018] [may2018]

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