home
hardware prices
news
articles
forums
photos
user reviews
Tech Support Forums - TechIMO.com
>
PC Hardware and Tech
>
Webmastering and Programming
why wont this work
Ask a Tech Support Question (free)!
User Name
Remember Me?
Password
Register
Blogs
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Search TechIMO for Answers:
why wont this work
Get bargains at
»
Thread Tools
Search this Thread
Currently Active Users
: 1521
Discussions: 200,952, Posts: 2,379,478, Members: 246,321
December 5th, 2004, 07:27 PM
#
1
(
permalink
)
boogieman063
Member
Join Date: Nov 2004
Posts: 56
why wont this work
this is simple, its just supposed to print that stuff to the output fle.
call the function and print to the file.
the program runs but nothing is printed
#include <fstream.h>
int main()
{
void print();
ofstream fout;
fout.open("a:/out.txt");
void print();
fout.close();
return 0;
}
void print()
{
ofstream fout;
fout<<"spongebob\n";
fout<<"cs1318.004\n";
}
Search TechIMO for Answers:
December 5th, 2004, 07:35 PM
#
2
(
permalink
)
paul9
It's the cheese guy! ¬_¬;
Join Date: Aug 2003
Location: Gateshead U.K.
Posts: 9,167
a:/out.txt
should that be
a:
\
out.txt ?
backslash instead of forward slash.
December 5th, 2004, 07:37 PM
#
3
(
permalink
)
paul9
It's the cheese guy! ¬_¬;
Join Date: Aug 2003
Location: Gateshead U.K.
Posts: 9,167
also, if
spongebob\n
and
cs1318.004\n
include the \n as a command line switch, then you have probably reversed those slashes, too.
December 5th, 2004, 07:57 PM
#
4
(
permalink
)
boogieman063
Member
Join Date: Nov 2004
Posts: 56
the slashes are supposed to foward, im using dev c++ i dont know why its like that, but its either two backslashes or one foward slash.
Thread Tools
Search this Thread
Show Printable Version
Email this Page
Search this Thread
:
Advanced Search
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
halo 4 xbox help not working
squik-man
General Gaming Discussion
19
January 18th, 2004
07:02 PM
compaq presario 4540
mhoule
Technical Support
6
August 16th, 2003
05:52 AM
Burned cd not working on cd players
MrMcGriddle
General Tech Discussion
2
August 13th, 2003
06:17 PM
multi-dsiplay screwed up when switching to win 2k from win 98
thePh@r@oh
Graphics Cards and Displays
18
February 7th, 2003
11:54 PM
Confusion in hooking up wires to MB
mikey76
Motherboards
3
October 30th, 2002
11:43 AM
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Most Active Discussions
Is It Just Me?
(
2943
)
The disrespect of Obama by Russian ..
(
41
)
Making Health Care Worse
(
178
)
Wireless Televisions.
(
12
)
CPU fan stops spinning randomly
(
9
)
Regular Build
(
11
)
windows 7 problem
(
7
)
Is the PSU I received dead?
(
12
)
radeon x850xt platinum & shader..
(
6
)
Print spooler problem
(
15
)
HIS HD5770 graphic card question
(
15
)
windows vista security holes
(
10
)
Install XP pro and a Vista laptop ?..
(
11
)
Foreign voltage
(
10
)
Recent Discussions
tv not turn on-makes clicking sound
(
2
)
SELLING FRESH,CVV,LOGINS,DUMPS,TRACKS..
(
0
)
CPU fan stops spinning randomly
(
9
)
EVGA 9800 gtx help with finding a goo..
(
11
)
Regular Build
(
11
)
Help with onclick and buttons
(
0
)
Modern Warfare 2: Who Bought It?
(
63
)
Virus advise
(
8
)
My monitor won't turn on after instal..
(
1
)
Laptop with wireless problem.
(
3
)
Internet Lost
(
3
)
Dept. of HS: NSA 'Helped' Develop Vis..
(
16
)
windows vista security holes
(
10
)
Point and Shoot Camera Suggestions.
(
4
)
Multiple Restarts Required at Boot
(
2
)
Ideal cheap graph card for PC-Gaming?
(
18
)
radeon x850xt platinum & shader 3
(
6
)
Graphics Card Upgrade Question
(
4
)
For Sale BFG GTX285 OC2 with 10 year ..
(
3
)
How to convert MP3's
(
4
)
Wireless Televisions.
(
12
)
Hp Artist Edition + Matching Bag
(
0
)
Asus P4G8X Mobo
(
6
)
Xbox 360 GTA: SA disk error
(
1
)
Is the PSU I received dead?
(
12
)
All times are GMT -4. The time now is
04:55 AM
.
TechIMO Copyright 2009
All Enthusiast, Inc.
Contact Us
-
Tech Support Forums - TechIMO.com
-
Archive
-
Privacy Statement
-
Terms of Use
-
Coupons and Deals and Dealighted
-
Store Ratings, Avoid Scam Businesses
-
Geek News - Tech News for the Geek In You
-
Web Business Blog
-
Top
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28