General C++ Programming - February 2017 (Page 12)

Reversing an array using pointers
 
I have this program that makes and populates an array. Then it is sent to a function called reverse, which reverses the order in the array. The compiler keeps g...
[5 replies] Last: @resDesE it's great to help...but please use the tags.... (by Flaze07)
Watch Fifty Shades Darker 2017 Online Movie Special Valentine
 
Why do you post such thing here...
[1 reply] : Don't reply to spam. Just report it. (by helios)
Code works but I don't understand if it is correct
 
Hi, I have made a code to check if edit distance between two strings is one, it seems that it works when I run it, but I honestly I don't understand why, for tw...
[1 reply] : "Correct" can be many things. These tools look interesting: http://ww... (by keskiverto)
Modulus opereator
 
Hi new at c++ have a problem, Using modulus operator write a C++ program that will convert military time to standard time(am/pm). Appreciate any help!
[2 replies] Last: #include <iostream> #include <iomanip> int main() { int hour = 0... (by closed account 48T7M4Gy)
pointers and dynamic arrays
 
void main() { char input ; cin.getline(input,100); //For example, user enters National University. char *q=input; ReverseSentence(q); cout<<input<...
[no replies]
Take in character followed by co-ordinate (white-space)?
 
Hi there. I'm trying to work on this program and I need help for getting a way for inputting characters like so: "Press G followed by the grid position(row, ...
[5 replies] Last: toupper converts a character to uppercase. http://www.cplusplus.com/re... (by Thomas1965)
Undefined reference to error - Quadratic formula program
 
Hello, I'm working on creating a program that solves the quadratic formula when given coefficients a, b, and c. I've just been receieving the errors: undefined...
[4 replies] Last: As mentioned above, there are no variables named a,b or c declared in ... (by integralfx)
Function call not working as expected
 
First I'll provide the code, then I'll explain it: #include <iostream> const int COLS = 3; const int ROWS = 3; void is_magic(const int numbers , int rows);...
[3 replies] Last: I am happy to say I was able to fix this program myself! If anyone wit... (by The Snowman)
Understanding a part of a function
 
Hello all, I have been studying C++, but am still a novice. While loading up free to use source code to experiment with on my Arduino, I keep getting an error...
[7 replies] Last: [quote=Jonnin]Arduino C++ does not fully support all C++ things, FYI. ... (by mbozzi)
Designing a WFS Client webservice
 
I have a web service, WFS. I use a library called GDAL for retrieving the data from the server. Here is how I do it. OGRDataSource *m_wfs_t; m_wfs_t = OGRSFDr...
[no replies]
by Ekinne
c++ program for sentences
 
write a c++ program to accept a sentence and classify into pronoun, verb, adjective, adverb
[1 reply] : try NLP (natural language processing) (by gunnerfunner)
Would istream tried to read again where it failed after recovering from fail state
 
According to C++ regulation, we can recover istream (ist) from fail state if not encountered serious problems using ist.clear() statement. But there is a que...
[6 replies] Last: Thank you sir, but does cin.ignore() really matter with the code abov... (by closed account 48T7M4Gy)
Buffer overflow?
 
Static analysis tool (klocwork) report error on this: memmove( &list.id[ count1 + 1 ], &list.id[ count1 ], sizeof(list.id ) * (count2 - count1) ); Bu...
[4 replies] Last: I found it. For the fix, you have to include that code inside a condit... (by steiryx)
header flies
 
I have one doubt that why some of the header files are inside this <_> (Arrows)and some of the some of header files are inside this "_" (Inverted commas). What ...
[2 replies] Last: this one is tricky :) first, you have a question. A doubt is somethin... (by jonnin)
Program help!!!
 
i have a program that i need to do for an assignment and i am stuck on it. Here is an exchange sort algorithm written in pseudo code: Exchange Sort of Ar...
[6 replies] Last: they have to be in the order you gave it when you wrote the code. you... (by jonnin)
Generating random numbers
 
Our C++ professor gave us a code to generate random numbers, but when I enter the code and run it nothing happens. Here is the code I have: #include <windo...
[2 replies] Last: The problem is essentially to check if a random number falls within an... (by gunnerfunner)
sorting of binary file
 
I was trying to sort the binary file wthin the same without using array w.r.t. roll number of the student but the program is not working. file already has cont...
[4 replies] Last: In your Sort function in your inner loop on j between lines 92 and 102... (by SIK)
by S G H
Expanding a parameter pack while decreasing a variable
 
I'm stuck trying to decrease a value while expanding a parameter pack. This is the best pseudo-code I could come up with. #include <iostream> #include <typein...
[6 replies] Last: @S G H The list-initialization hack is sequenced. http://en.cppreferen... (by mbozzi)
What an expression ended by & means ?
 
Hi all! In line 36 I want to display the value of x|0]. I call for that function takeStruct, but my syntax is incorrect. All that because I don't understand wha...
[6 replies] Last: That value is simply 'garbage', the array within the struct is not pro... (by Chervil)
Read Numbers Into Array - Logic Error
 
Hi Everyone, I have to write a program that reads a list of integers from a file that are on separate lines into an array and then determines the highest and l...
[2 replies] Last: Thank you! (by puttputtpurplecar)
February 2017 Pages: 1... 1011121314... 16
  Archived months: [jan2017] [mar2017]

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