Beginners - November 2017 (Page 20)

After completing if statement, return to top of Main?
 
Hello, currently I am working on a program that has a variety of choices that a user can choose from, simply by entering letters A through F, which then sends t...
[2 replies] Last: similar to this #include <iostream> int main() { char choice('... (by closed account SECMoG1T)
finding the word ends with search string
 
In main function, i get a source string and a search string. Then i want to check whether a word in source string ends with search string.I dont have a problem ...
[3 replies] Last: what is the code supposed to do because its hard to read <format?>; he... (by closed account SECMoG1T)
by Lado
Linked lists, swap nodes
 
Here below is a function from a linked list problem. The proble prints out the link list: A B C D and the switchPlaces function swiches B and C so that the new ...
[1 reply] : I'll try to explain, but someone else might be able to explain it more... (by Ganado)
Add or Subtract from a total based on first character
 
Hello, I am trying to use the following function to search an array of structs, however it doesn't seem to be working and it is returning the same thing no matt...
[2 replies] Last: Duh!!! Thank you so much! (by loganc123)
Difference in array and tuple
 
I am trying to read a txt. file into a tuple. I have done this before with an array and tried to use the same code. I'm not sure what I am missing about the d...
[5 replies] Last: ooh, i think i dint check that twice, my bad change it to std::getl... (by closed account SECMoG1T)
Switch using array trouble...
 
I'll start with the code in a class member function removeFromList: switch (option) { case 'c': case 'C': strcpy(tempArray, " "); list ....
[2 replies] Last: Why is it illegal? Is it because I declared a variable but ended up no... (by Patch97236)
Where is the problem
 
Where is the problem ı can't get it.My output like ==venss-858993460evenss-858993460evenss-858993460evenss-858993460evenss-858993460evenss-858993460evenss-8589...
[4 replies] Last: Thank you... (by FURKANkartal)
Printing pointer's address
 
My professor has asked us to create a program that uses a pointer and will print the value of the pointer and the address of the variable. I've written what I t...
[3 replies] Last: Hello toomanyquestions, Glad it worked out for you. What I showed you... (by Handy Andy)
problems with if and and characters
 
hello guys i made code cause i wanted to see if could make it read chracters and not numbers, beacuase i know there is another way to make this with something ...
[3 replies] Last: Hello mastgraft123, Even removing the single quotes from "r" will not... (by Handy Andy)
Program will not show my cout statements
 
I am writing a code that involves a class and my main.cpp file will not show my cout statements for the very beginning of the code. Is something out of place th...
[1 reply] : https://repl.it/OIFQ Works perfectly fine, your std::cout messages in... (by goldenchicken)
l need help
 
the loop is not running according to condition, what l did wrong? please help. #include<iostream> using namespace std; int main() { int n=0; cout<<"En...
[9 replies] Last: float agv(int n) //n = the amount of numbers { int total; int count ... (by goldenchicken)
Need help! User input to add to a .txt file
 
I'm writing a program that gives the user the option to display the first five names (one name on each line) on an existing names.txt file with a few dozen name...
[1 reply] : I'm having a hard time with the addNewNames() functions as when I go ... (by Enoizat)
by trogne
windows GetMessage function
 
I'm trying to understand this description of GetMessage windows function : "Retrieves a message from the calling thread's message queue. The function dispatc...
[no replies]
by Delcho
Adding lines at the end of a file in c++ problem
 
Can someone tell me why the program is not working? Mainly the program is for adding new lines at the end of a file in c++ fstream f; int itemnumb...
[5 replies] Last: No, I meant like this. f.open("file.txt",ios::ate); if (!f) { ... (by Thomas1965)
code for arr
 
on the part not working, i want to disp 1 12 23 0 -1 -12 -23 289 but it show -1 -1 35 0 0 0 35 0 #include<stdio.h> #include<math.h> #defin...
[3 replies] Last: Well yes. That's how C++ works. When dealing with simple int values,... (by Repeater)
by cash
function menu
 
I got my menu function to work, but I didn't utilize find, removeIndex, and removeValue functions. Im talking about these- 4. Write function find that takes as...
[5 replies] Last: Well, the first stage would be to write the find() function. Write fu... (by Chervil)
Creating Circle [Do while Loops]
 
How do you create a circle using do while loops? I created using for loops,if else statements but can't do it with do while Any help?
[no replies]
Simple JSON program error
 
Okay I'm trying to run this example code of a json parser, pulling data from a url. #include <cstdint> #include <iostream> #include <memory> #include <string...
[no replies]
by jsbd29
Can someone ,please help me to fix the error on these Functions
 
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the av...
[1 reply] : Remove the white-space between '+' and '='. The add-assignment operat... (by mbozzi)
random
 
Yes I know the title seems a bit awkward. #include <iostream> #include <stdlib.h> #include <Windows.h> #include <stdlib.h> #include <random> using ...
[2 replies] Last: #include <iostream> #include <algorithm> #include <random> #include <... (by JLBorges)
November 2017 Pages: 1... 1819202122... 33
  Archived months: [oct2017] [dec2017]

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