Dear Salem
Thanks, this is now solved thanks to your last suggestion.
Here is the code to declare a variant, assign integer data to it and then print out
std::variant<int, std::string> var;...
Type: Posts; User: stephanos
Dear Salem
Thanks, this is now solved thanks to your last suggestion.
Here is the code to declare a variant, assign integer data to it and then print out
std::variant<int, std::string> var;...
Dear Salem
Thanks, I made the change and it builds. Next I added a cout:
std::cout << "Content of var is: " + std::to_string(var);
but this led to an error:
“C2665 'std::to_string': none of...
Dear Salem
Thank you
But how? This application, MS Visual Studio Community 201916.6.3 is harder to use than Code::Blocks. I have looked around and cannot see how to do that.
In Code::Block...
Greetings from sunny London. I know some C, have written in Lazarus Pascal, enjoy coding for pleasure, and decided to dabble in C++. Lots of terminology still escapes me.
I was experimenting...
Just in case this is still an unresolved question, I have pasted in a Windows C solution with helpful comments
/*
Preparation
1) create a file: AccessThisFile.txt
2) Enter the following text:...
I am reposting the above response so as to make it more readable
Dear jimblumberg,
Thank you. I went to the application and clicked Settings > Compiler > then the drop down list of what I...
Dear jimblumberg,
Thank you. I went to the application and clicked Settings > Compiler > then the drop down list of what I think are compilers. But no C11 option to select. After LaserlightÂ’s...
Thank you both
What was
became an error after I changed the .C to .c. It was resolved by coding:
After making changes to 2 for loops as above, the programme compiled and Ran...
Dear All
It is the last part of this code that is not working. The function removNb(Length, inner); makes many returns to a structure variable called "pair" The first variable in "pair" is tested...
Update and resolution
The compiler is in fact GNU GCC. Code::Blocks is 32 bit on a 64 bit Windows 10.
Meanwhile, Christop has solved it. When the first format specifier is inaccurately %ld...
Thanks to both of you and here is additional information
The code: "printf("MAIN2: %ld - %lld\n", pair.first, pair.snd);"
outputs: "MAIN2: 26 - 1507533520896"
The code: "printf("MAIN2: %ld -...
Thanks for the reply
The compiler is Code::Blocks, 13.12 (Windows 10).
Have you answered the question or are you waiting for an answer to the complier question?
You have said something about the...
Here is a solution that does not use pointers and gets to the heart of the issue, element positions are not the same in the second loop
/*Merge2Arraystoa3rd.c*/
#include<stdio.h>
int...
I have declared a two variable structure that has 2 long long integers.
After declaring a variable "pair", of the structure Pair, I am able to
write a value to one of the variables, "first", but...
Thanks to all who replied
A very useful lesson
Dear All
I have two C City & Guilds (4240, 4250) and I have decided to continue and learn C++. So I have purchased a book with compiler on CD, Bloodshed Dev-C++. I have written a programme found...
Dear Fellow coders
I have an array of integers in main() and all elements are given a zero value
int counts[10] = {0,0,0,0,0,0,0,0,0,0}
I am parsing a pointer to this array to another...
Dear Salem
An excellent solution. This has broardened my knowledge as the idea did not occur to me even though I have used fgets() with files.
I changed the stream/pointer at end for "stdin"...
Dear All,
I am using Borlands C++ V3 DOS compiler for writing a C programmes.
I am acquainted with scanf() and the use of scan sets. I have used scan sets to define which
letters, numbers and...
Dear Unregistered Guest
Please can you supply the dat file that this program access.
I have compiled using Borland's C++ V 3 DOS and got a warning about 'in' being assigned a value that is...
Dear Guest
Please say more about the DOS programme/s you have in mind.
Are they batch files you have writtenyourself or applications you have installed ?
Also, what environemnt ar eyou...
Dear Andy
Thank you for your e-mail and link for the Borland C++ V5 compiler
I went to the C Board and read your question.
I have a few questions:
1) Have you tried to compile and run this...
Dear Kalski
I am a bit interested in your problem, though cannot say that I fully understand it. Please say more about what the programme is supposed to do and what it does. Also confirm that...
Dear Garfield and Slow
I have a little more news
I have downloaded the Borland command line compiler that was referred to and wrote the test programme the support material gave as an example. ...
Dear Garfiled
Thanks for your reply
Please clarify the following: Do you mean that the three functions are known to be included the headers of the complier that Slow is using ?
Also do you...