Beginners (Page 2)

by tcanna
Battle ship, trouble compiling know where, not why
 
I am having trouble getting this code to work and it is only one line that stops it from compiling b...
[6 replies] Last: Ok, so it works. Is there a way to label my columns as letters, I know... (by tcanna)
sorting arrays from top-down
 
Hello everyone, I just wanted to thank you all for all the help I have gotten from here. When I know...
[5 replies] Last: Thank you. I might try and do a new post so people don't get confused.... (by jpanther)
need to have user end when desired and not enter 0s or letters in my calculator program
 
1. I need to add a function that will alert a user not to use numbers <= 0 or a character for input....
[2 replies] Last: As typeid tests the type of the variable, which will always be double ... (by andywestken)
Sorting two arrays (parallel) question.
 
When I run my full program, array1 sorts perfectly. However, the values that go along with array1, w...
[3 replies] Last: What happens if, in the second code you say works, you change, if (m... (by CodeWriter)
Copying an array into another array but in reverse
 
I have another program to write where i need to copy the contents of one array into a brand new arra...
[4 replies] Last: I see that makes sense. I appreciate you helping me with all this! You... (by kingkush)
by agda
Why doesnt this program Work?
 
Write your question here. #include <iostream> #include <string> #include <time.h> using ...
[3 replies] Last: #include <iostream> #include <cstdlib> // YOU NEED THIS #include <s... (by CodeWriter)
How do i let the user determine the size of an array?
 
I am trying to write a program where the user can determine how large to make the array but i keep r...
[8 replies] Last: using std::cout and std::cin are more specific and clearer than u... (by vickoza)
Class Questions (1,2,3)
 
I've just started trying to learn classes in C++. In the code below, I've created a constructor f...
[53 replies] Last: Sounds like Abstract Base Class ( ABC ). Which is legitimate design ch... (by MiiNiPaa)
Hangman - trouble with strings
 
I have just begun programming, and I thought I would try my hand at making a very basic game of Hang...
[1 reply] : strcmp compares strings (char*). And it looks like you are trying to p... (by MiiNiPaa)
Questions about a pre-defined piece of code
 
I hope my question fits the forum and, if it does not, please let me know and I will kindly look for...
[2 replies] Last: (1) is an constructor with an initialisation list (the preferred way t... (by mutexe)
Why does this program work?
 
The program in question is the following: string text = {"one", "two", "three"}; string...
[9 replies] Last: Assumes rather than knows. "C-string" is a convention that a char* p... (by keskiverto)
Multidimesional vector constructor question
 
Why doe this work and the next one cause an error? #include <vector> #include <iostream> using ...
[9 replies] Last: in the second constructor in the post above, the parenthesis represen... (by MiiNiPaa)
Scope Handling Ideas
 
Hello, I'm writing my own file format (for a small personal project). I've looked at many different ...
[2 replies] Last: Thanks for the idea about stacks. I can't believe that I forgot about ... (by MaxterTheTurtle)
Assigning iterator and integer in same statement
 
Why can't you declare and assign an integer with an iterator using the comma operator? #include...
[2 replies] Last: You're right. You can only declare one variable in the for statement, ... (by shawnlau)
Size of char array decided by user input?
 
I want to declare a char array with not initial size. Later I will prompt the user to enter in a sen...
[15 replies] Last: 2. Just the string (using index-based instead or iterator-based access... (by andywestken)
Program returns weird output
 
#include <iostream> #include <cstdlib> #include <cstdio> using namespace std; int bodyP...
[1 reply] : at line 123, TPri = i-6 gives the same index every time round the lo... (by Jaybob66)
by mzzz
how to explain this phenomenon
 
hi, every one , i am from china, here is a question about how variables be allocated on memory. m...
[2 replies] Last: > My question is why not *pc is 0xd2 and *(pc + 1) is 0xce? ... or a... (by JLBorges)
Homework Assignment - Using array of structs with binary files
 
After two days of working on this, I have to raise the white flag. The problem says to create an arr...
[6 replies] Last: Thanks so much MiiNiPaa. I appreciate your help...got it working. (by D0CHollywood)
by MrAnts
How to check if array[0] is ""
 
Hi I am coding a terminator for my cmd.exe, if the userinput is "" or "\n" which means the user pres...
[5 replies] Last: But you still need to make your array bigger: if you say to getline th... (by MiiNiPaa)
by omurad
Copying a string to clipboard
 
I am attempting to make a C++ program on Linux Mint that copies a pre-set string to the clipboard ev...
[no replies]
Pages: 1234... 45
  Archived months: [may2015]

Cannot post in this page. To post a new message, go to the first page.