Beginners - April 2011 (Page 35)

problem printing argv[] and filename
 
I'm trying to be make a console program that looks in a specified folder and shows the name of the first file. In trying to print argv (the directory path) it ...
[2 replies] Last: Tried it, same weird output :( (by Garritt518)
by serima
data structure
 
i have a problem about this codes. i have a structure and a procedure using that structure. struct kromozom_s { string rota; ...
[1 reply] : Because you passed the struct by copy. Any change that you make inside... (by ne555)
How do I print the contents of an array ?
 
I'm trying to print out the contentes of my array in order to make sure I'm correctly filling up my array. How can I get the contents to display out on the cons...
[3 replies] Last: do{ inFile>>d ;// seeding the numbers into the array :D }whil... (by Browni3141)
Text output not working?
 
Okay, so im trying to write to a file, and this is the code i came out with: cout<<"File Destination: "; getline(cin, file_path); Sleep(1000); Clear();...
[1 reply] : Where are you writing to the file? You should probably post that part. (by Browni3141)
header files & multiple declarations
 
hi I've already put an "#ifndef" guard in my header file yet it still tells me that my declared objects(which I need globally) "are declared already". Do ...
[5 replies] Last: thanks, extern did the trick. Today is the first time I've learnt and ... (by Blessman11)
Create a new NotePad document
 
Okay, so Ive learned how to read a file and write into a file, but I want to know how to create a NEW file. How would I do this? Im using windows Vista and I ...
[4 replies] Last: Ooh, okay thanks. BUt what does the 'out' do? and isnt the ios_base ... (by DeeJayParadice)
by Gage
Compiler for a java programmer?
 
Hello, first post. I am a java programmer, I used netbeans as my compiler. I am in the process of learning C++, and need a direction as to what compiler...
[5 replies] Last: Eclipse and Netbeans are IDE. A C++ compiler is like g++ which is part... (by matsom)
by rad301
Shuffle Function
 
I'm currently creating a playing card memory game in my programming class, and I'm having a lot of difficulty creating a shuffle function for the deck. The ...
[10 replies] Last: ^Actually, the first compares for equality, the second assigns. They ... (by firedraco)
Best way to create image effects (bevel etc)
 
Hello, I'm new to c++ programming but have read a few books on the subject and am starting to get comfortable with the language. I have an idea on making a g...
[9 replies] Last: OpenGL supports 2d surfaces, I believe it's something like "glVertex2f... (by Computergeek01)
by k210in
Initializing array of objects in an object?
 
Hi All, A very basic question: The question is embedded inside the code in class B. Thanks K class A { int width; int *y; public: A:...
[3 replies] Last: I was toying with the idea of overloading your 'A' class constructor t... (by Computergeek01)
ifstream question
 
If I am continually opening and closing a file in a program is there a way to take note of where the program was closed and continue on later??? ifstream inp...
[6 replies] Last: I agree, a better method would be to read the data into an array, forg... (by Computergeek01)
inputing binary into structure help
 
okay so i am basically trying to figure out how to read a binary text file. I'm trying to read a file with hockey stats including name, goals, and assists and p...
[1 reply] : You don't have a main function anywhere, you need one to compile/run y... (by firedraco)
by dupur
calculating execution time
 
Hi, I need to know how to calculate execution time of a C++ program. Please help.
[9 replies] Last: its also going to take longer depending on how you coded it. if youre... (by ascii)
how to select a Digit Of Integer
 
Hey guys am stuck at some point if i have a value say 5432 how to get 5? same as the rest of the number do i need to know the reminder?? becuase really suc...
[3 replies] Last: use %10 to get the last digit. for example if num is an int variable a... (by Maese909)
Need help with nested for loop
 
Hello, I'm new here, but I have a question. I am in an intro to C++ class, and I have a questiom about one of the codes our professor wants us to write. The ...
[11 replies] Last: Yes, If we look at the formula, it's similar to the area of a triangle... (by Mathhead200)
help ASAP!!
 
hello i am having trouble with some code that i have typed up i just cant seem to get it working. any help would be gratefully appreciated the errors that i ge...
[5 replies] Last: thanks for the help it was that specific else if statement i dont unde... (by UrbnCampr02)
Place "Cursor" in file
 
Hey! Im wondering how I would "Set" the cursor in a file to another line. How would I do this? Im really tired of having to "getline()" to go to lower lines an...
[1 reply] : Use tellg and seekg. Caveat: file must be open in ios::binary mode. (by Duthomhas)
Input txt file with single quotes
 
I am in the process of writing a program that needs to read an input file and then tally the number of times each letter is used. My issue is the input file as ...
[no replies]
Basic Fraction Problem
 
I've just started learning c++ on my own and am at a very basic level. I was working a problem in my book where I need to add two fractions and output the sum. ...
[1 reply] : That's because x y z w are integers and for integers 2/3 = 0 (they rou... (by hamsterman)
cant output doubles
 
For whatever reason, whenever I try to output a double, the program crashes and I have no idea why. #include <iostream> #include <cstdlib> #include <ioman...
[5 replies] Last: does anyone have an idea? I need to have this finished by tonight. (by savan12986)
April 2011 Pages: 1... 3334353637... 55
  Archived months: [mar2011] [may2011]

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