Beginners - April 2013 (Page 16)

Arrray simple program
 
My Array Program that is really simple will not work. It comes out with just one number. I also keep trying to change the array numbers. #include <iostream...
[3 replies] Last: Thanks, it worked (by Inficard)
by nass
quick help.
 
Hi, I wrote this code and I want it to find if all number were positive or negative or mixture? + I want to find the largest and smallest, finding the largest ...
[9 replies] Last: Try this #include<iostream> using std::cout; using std::cin; using s... (by eyenrique)
Help me convert this to object oriented
 
All, I'm having a hard time to convert this to object oriented code. Please don't give me the answer. Just say what I need to do. #include <iostream> ...
[no replies]
How to use an arrray with vectors and structs?
 
I am making a song player simulator program. Right now i am just trying to get the playlist to show all the songs i input. i tried making a for loop and adding ...
[3 replies] Last: Here is an example #include <iostream> #include <vector> #include <s... (by Yanson)
SDL Lazyfoo help..
 
I was going through Lazyfoo's tutorial, (lazyfoo.net/SDL_tutorials/lesson01/index2.php) and my sdl window flashes for 2 seconds and doesn't show an image. can s...
[1 reply] : Did you try specifying the full path to hello.bmp? (by shacktar)
Robot Help
 
Here is my code. #include <iostream> #include <string> using namespace std; string question; string answer; int main (int argc, const char ...
[7 replies] Last: http://www.cplusplus.com/reference/istream/istream/ignore/ something l... (by giblit)
by ccwhat
may i ask the differences btwn int* x[3]; and int (*x)[3];
 
like the title said. why the parentheses may i ask? :)
[2 replies] Last: thanks a lot, zhuge :D (by ccwhat)
Using a file inside a function
 
I need to use an input(and later an output) file inside a function. I am writing this according to the textbook, and yet I recieve this error. If someone can cl...
[11 replies] Last: Nps :) (by Zaita)
by Ch1156
Problem with text game
 
My text game is not working correctly, the first thing is that I load the game and it loads the ammo but when i go and get in the arena it is different from wha...
[1 reply] : I'd suggest adding some more debug cout statements to track your logic... (by Zaita)
Is it possible to get a user to create new variables?
 
I am wondering.... let's say I execute my program and it runs perfectly. Is there a way to get the user to create new variables by writing their name and type ...
[3 replies] Last: Yes you can. e.g #include <iostream> #include <iomanip> #include <s... (by Zaita)
For some reason I am unable to delete character pointers
 
It gives me a weird error where a pop up comes up and says "HEAD CORRUPTION DETECTED" #include <iostream> #include <cstring> using namespace std; c...
[4 replies] Last: Is that the \0 character? I thought that was automatically added in? ... (by Disch)
Outs won't work
 
So I have most of the code working but I can't seem to get it to send out to the text page. So if there's something I'm missing with my outs please help. Very...
[1 reply] : Does your loop work? You're not clearing the cin buffer after you get ... (by Zaita)
why wont my program let me enter data
 
I know I'm not using all my functions at this time but I need to test to make sure I can enter data and as of now I can get my code to finally compile but it wo...
[3 replies] Last: Also consider reading through: http://www.cplusplus.com/forum/articles... (by Zaita)
Strings question
 
This is my first program time writing code with strings and I would like how I would do number 5? 1 Ask the user to enter the name of a file 2 The file sh...
[6 replies] Last: Thank you (by closed account LN3RX9L8)
Why won't this compile?
 
I am using Visual studio 2010 to write my C++ code. The syntax of this code is right (I think) because the editor did not raise any flags but when I try to comp...
[5 replies] Last: It's one way declaring that an array is to be passed to the function. ... (by Chervil)
Where should "using" be placed
 
I am writing a program that has one header file. However, I have always put "using namespace std;" after all the includes which means that the header file neve...
[2 replies] Last: Thank you, I was confused about this convention and I'm trying to stic... (by JayRyGeo)
by giblit
Console colored text
 
This works perfect if I do something like print("Hello world", red). void print(const string a, const int b) { SetConsoleTextAttribute(GetStdHandle(STD_OUT...
[2 replies] Last: could you please give me an example I am a bit confused I thought that... (by giblit)
Bubble sort more than 2 vectors? help!
 
TLDR; for (int j = 0; j<months.size()-1;++j) (int k = 0; k<years.size()-1;++k) (int l = 0; l<appointments.size()-1;++l) { temp1 = months ;...
[6 replies] Last: @Olysold Hey Thanks a lot for respond :D. Using fg109 post worked. A... (by Melicalol)
Explanation help please
 
Can someone explain what is happening in this code? What is happening in the all the loops? I know this is a lot but I am doing something similar to this and I...
[4 replies] Last: There are some things wrong with the code. [code firstline=37] ... (by fg109)
Users Entry Causes Segfault
 
I need the user to enter an int and press enter. If they enter several chars before pressing enter it causes a segfault. How can I get the first char of the lin...
[no replies]
April 2013 Pages: 1... 1415161718... 83
  Archived months: [mar2013] [may2013]

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