- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
49 Posted Topics
I've been trying to fix a problem with getline() and cin.getline().Here's a example I've made and it still has the problem: [TEX]" No matching function to 'getline(std::istream&, char[100])' "[/TEX] Here's the code: [CODE] #include <iostream> #include <windows.h> #include <string> using namespace std; int main() { char name[100]; cout << "\nEnter … | |
Re: I would recommend phpBB, since I use it and its real good. Thats my opinion, but if you want, you can just host some kind of a free forum and link it to your webspace, and place a link on your forum that leads back. | |
While coding a random Employee storer, I use Scanner, and its .nextInt(); to ask the user for the employee's contact number: [CODE] Scanner Scan = new Scanner(System.in); out.print("\nEnter Employee Contact Number:"); newEmployee.contactNumber = Scan.nextInt(); //(I have a class Employee) [/CODE] I get the error : [CODE] Enter Employee Contact Number:456645 … | |
Re: For the compilers, try: [url]http://www.codegear.com/downloads/free/cppbuilder[/url] | |
Is it just me or is there less people in the C++ and Java Forums now? When I signed up sometime 2008, it would be buzzing with activity and people would post heaps and receive answers quick, maybe in around 5 - 20 minutes, but I looked through the last … | |
Re: But the book I'm reading from uses Scanner, is it still basically the same thing though? | |
Hi, I'm having a problem with reading from the char , coupon, and it comes up with an error saying [CODE]Exception in thread "main" java.lang.NullPointerException at input.Main.main(Main.java:27)[/CODE] At the line which I read from the char, which is that myScan.findInLine bit, I am working from a beginning java programming book, … | |
Fail :icon_exclaim: :icon_lol: [url]http://www.youtube.com/watch?v=25UJlRd3lKs[/url] *Not Mine Though -_- | |
Re: add this after your hello world line [CODE] cin.get() [/CODE] or use the header [CODE] #include <windows.h> [/CODE] then add in after Hello World [CODE] system("PAUSE"); [/CODE] | |
Hey guys, is there anyway a C++ program will continue to execute and not pause when I run a program for it? E.g I've already got [CODE] system("iTunes.exe.lnk"); main(); [/CODE] It calls main after it executes the program, but it is paused until I exit iTunes, is there anyway to … | |
Re: .............The question was pretty straightforward, yes. But we aren't those answer givers, or books that you can use to get answers:@, if you really do want a answer though, check[URL="http://www.daniweb.com/forums/announcement8-2.html"] this [/URL]out, it helps alot. | |
Re: Go Try [url]http://www.cplusplus.com/doc/tutorial/files/[/url], it has pretty much everything you need to know about basic writing to and from files. | |
Hi, whilst reading a book on Java, I came across a bit where the author used [CODE] GregorianCalendar now = new GregorainCalendar(); [/CODE] And I was just wondering, is that any different from [CODE] Calendar now = Calendar.getInstance(); [/CODE] And if so, why did he use GregorianCalendar instead of the … | |
Re: You said: [QUOTE] I get compile errors on this simple program. [/QUOTE] and then you said: [QUOTE] I dont have a compiler installed [/QUOTE] ???? | |
Re: When you say [CODE]cout<<"Enter any letter (maximum is 10) :";[/CODE] Do you mean the maxiumum amount of letters you can enter is 10? If so, your while loop should be [CODE] while(i<10) [/CODE] so that after 10 letters is entered it exits the loop, and if the user would want … | |
How do you make a C++ Program run at start up? I'm using Vista, and when I right click the start button and press open, it comes up with my programs in the start menu, how do I get to the Start up Folder?:S | |
Re: There's a Quite alot of Problems in there, for example in many places you put: [CODE] if (answer1 == 'y') { count1 =2 ; else count1 = 0 ; } [/CODE] You might have this problem : expected primary-expression before "else" That's not correct since you want it to be … | |
Hey, Im trying to get the user to type in a file name, and then the program will copy the file to some where else like C:\ or USB or something. So far this is what I've come up with: [CODE] #include <iostream> #include <windows.h> #include <stdlib.h> #include <conio.h> #include … | |
Re: I don't really get what you are asking, do you mean you have the test.txt file on the desktop and the code for opening it is for a user, but you want to open the file again on another user? | |
Its been a while since i realised i didn't know how to mark one of my threads as solved.:$ Any help will be appreciated...:) | |
Hi, I have a question with ofstream, is there anyway to ask the user for a file name, then create the file, and write to it? Like: [CODE] string file; cout << "Enter filename:"; getline(cin, file); ofstream ofile; ofile.open(file); ofile << (stuff....); ofile.close; [/CODE] ...except that doesn't work properly.:S Thanks … | |
Re: Do you mean to check how many elements there are in an array? | |
Does anyone know a decent site for studying about ctime(or time.h) in c++ thats good and doesn't end up telling you its in C?:@ :-/ Cos' when I search on google and I when thought I had found a great site, its actually for C programmers. Any help would be … | |
I'm working with structures, but somehow it skips one of the user inputs for the pie's price: [CODE]#include <iostream> #include <windows.h> #include <string> #include <conio.h> using namespace std; const int ESC = 0x1b; struct pie{ string brand; float price; string flavour; }pies[5]; int main() { cout << "Structures."; cout << … | |
Ok, Im not trying to be evil or anything but is there anyway I could use C++ to open a website in a window, then record what the user types? So the website is google, and some random guy decides to search up dogs:twisted: , dogs would be recorded some … | |
Re: Go eat a can and put your best effort in to it. | |
I just knew about getch() and found it better than cin (a lot) but there's one problem bugging me, can you makea n if statement for getch()? For example they have: [CODE] int a; cin >> a; if (a == 1) //blah else if (a ==2) //blah else //blah [/CODE] … | |
Re: I would reccommend 600x800pixels or 1152x864. (welll thats wat my laptop uses anyway...) | |
Re: Why even bother reading the signature?(although you got to admit, some are pretty funny) | |
Re: I hear you can do that in javascript but other wise i have no idea | |
Re: Do you want the users to fill in a form, then when they press submit, the form sends to your mail? If you do, i have no idea, but i'd thought you had to get some kind of program. But all I know is the 'mailto', the user clicks it … | |
Well. I 'm trying to get a program in C++(MS-DOS) to open another .exe file. I thought there might have been a way with the: [CODE]system ("main.exe") ;[/CODE] to call it, but somehow it does not work and its like it skips it completely. I'd appreciate any help. Thankyou. (Sorry … | |
Re: For these type of menus and stuff, its best to use javascript. Even though I don't know alot of javascript, I'd recommend it. Try Google and search how to do that. Although I have never heard of what you just said, so what?! Give it a go and try. | |
I 've linked the two files together, main.cpp and myClasses.h, I've declared a variable, but what I'm asking is can you access a variable from myClasses.h? Here's a example of what I got so far: [CODE] //main.cpp #include "myClasses.h" #include <iostream> using namespace std; int main() { ClassOne myClass_instance; s … | |
Re: I would go with corrupted Disk. Make sure the disk isn't scratched. | |
What i'm trying to do is, basically, link one C++ File, to another. For example, first i have a cpp file, like, main. And I want to have a part where the user chooses something then the other cpp file opens. | |
Re: Make it so that users can input smilies, pictures and stuff like that. | |
I am trying to get a program so that its sort of like downloading something, when it shows you the % and stuff, in which it goes up. I've been trying to get it to work, but what I done always doesn't seem to work. And I was thinking if … | |
Re: Hey, I went on your first link and it works for me. All the navi bar is in order. I use IE6 I think, but I don't reckon that helps that much. Advice: The Navi bar is great, but you can change it into a flash navi bar. It'll look … | |
Hey Everyone. Is there any way to make a sub? For example there's int main(), can I make something else like int menu() and sort of link int main to int menu? I have no idea how to do this.:-/ | |
Re: Use Marcomedia Flash Professional 8 or in mx, is best for making any sort of menus. Although I don't use Flash That much, I have been told its good and easy to use. Or use just Marcomedia Flash 8, the Professional is harder to use, and more complicated. Or go … | |
Re: I do not know any WYSIWYG Editors, I never tried Dreamweaver, but my friend says its good Editor. Or use Microsoft Expression web2 or 1. Advice: Actually learn HTML and use Micorsoft Expression Web, or Dreamweaver | |
Re: I changed some bits but, hey, it works for me. I use Dev-C++ Try this: [CODE] #include<stdio.h> #include<conio.h> #include<iostream> #include<windows.h> using namespace std; int main() { int unit=3; int reading,previous,current,consumed,bill; cout<< "Enter your meter Number:\a"; cin>>reading; cout<<"Enter previous redaing of meter:\a"; cin>>previous; cout<<"Enter current reading of meter:\a"; cin>>current; consumed=current-previous; cout<<"Units … | |
Is there any way to add images onto your program? I'm using Dev-C++ Thanx | |
Re: Hey, um i'm not sure if this works but if it actually works that'll be great, there's only one thing you need to change, the img src, its image1(and 2).bmp but you can change it into any image file. (this better work...:-/ ) [CODE] <html> <head> <title>TEST</title> <body bgcolor="#ffcc00"> <center> … | |
Re: Do you want Dev-C++ IDE or do you just want Dev-C++? |
The End.