Questions tagged as 'c++'

1
answer

Form String with single quote. Error ORA-01756

I am running a ORACLE statement from C++ and I receive this error:    ORA-01756: quoted string not properly terminated (OCI_ERROR) I form the string sentence as follows: sprintf(sentence, "INSERT INTO \"TABLA\".\"...
asked by 11.11.2016 / 09:37
2
answers

Call dynamic functions from static function?

I'm having a very silly problem, and I do not know what else to give it, I've tried creating instances but something will be wrong. I have a static function that collects the value of an external window, and depends on the value of that funct...
asked by 30.08.2018 / 12:16
5
answers

How is an empty string valid?

I am trying to make a cycle that reads a string while it is not empty if it fulfills that it does not contain any character because it goes out of the cycle; but I have not been able to get a loop and it never comes out, here's my code: #inclu...
asked by 21.06.2018 / 23:43
4
answers

Make a program that goes from Int to String

Make a program that goes from int = 123 to string = "123" I did a program that does it with stringstream , but now they ask me to do it without that, with pure cycles, I tried to do it like this: Cout<<"datos: "; C...
asked by 18.04.2017 / 06:55
3
answers

c ++ Problem when dividing 2/3

I need to multiply an X value by 2/3 (Two Thirds), for which I am using the following: #include<iostream> using namespace std; int main() { double var; var=2/3; cout<<var<<endl; return 0; } and to my sur...
asked by 26.10.2017 / 03:32
3
answers

Print edges of a c ++ matrix

Community, I ask for your help with a small problem. I'm just learning C ++ and I've been working with arrays and arrays, I understand the logic of how to print a matrix and how it goes through its contents, but there are things that I can not s...
asked by 05.04.2017 / 20:16
2
answers

Segmentation Fault - Recursion

I created the following function: void imprimir(void){ cout << "Y\n"; imprimir(); } Trying to learn more about the usefulness of using a recursive function (a function that calls itself). By including it in my code, this ha...
asked by 27.03.2017 / 22:37
3
answers

Pointer vs. Reference

Original author of the question link    Jack Reza link What would be better practice when passing the original variable to the function to work with it by: unsigned long x = 4; void func1(unsigned long& val) { val = 5...
asked by 05.12.2015 / 08:20
2
answers

Print Multiple Data in C ++

Good morning, I have the following exercise in which I wish that at the end of the program I would throw a list with the names and ID of those who are foreigners. How can I do it? #include <iostream> #include <iomanip> #include <...
asked by 10.04.2017 / 15:31
3
answers

Error with fixes

Hello everyone, is that I try to solve a problem with minor and major fixes and make their difference but ... the program defines well the major element but not the minor so is the arrangement 2 5 3 7 12 9 8 5 4 10 Define the biggest on...
asked by 29.09.2018 / 20:04