General C++ Programming - March 2013 (Page 33)

by Kangus
What is wrong with this code?
 
#include <stdio.h> int main() { FILE *fp; unsigned long long int b =34; fp=fopen("g:\\my.txt","w"); while(b<=39) b++; { fprint...
[12 replies] Last: @Kangus: naraku9333 posted the correct code. In your code: while(... (by vigo)
15-Puzzle Help
 
This is for my class in college. I've already turned this in late and will get points off for not having this program done correctly; but this week we are expan...
[2 replies] Last: Any Help would be appreciated. (by graphic2489)
trying to print the square roots of numbers with rows and columns
 
this is what i have so far #include <iostream> #include <cmath> using namespace std; int main () { int v; cout << "Enter positive number of rows" << e...
[4 replies] Last: yea you are correct i could have sworn i tried this earlier thanks tho... (by fresheze13)
by jadch
how can i find and print the winner in this case
 
[12 replies] Last: Miinipaa i just noticed something when we write winner =c because if... (by jadch)
boost shared_ptr error
 
Hello people, here is the line and the associated error: vector<boost::shared_ptr<line>> coordinates; coordinates.resize(line_counter); for (int i = 0; i<...
[3 replies] Last: Thank you very much! Can't believe I missed that! Also the alternative... (by gugge444)
by jaded7
programming paradigms
 
Except imperative and object oriented programming, what paradigms does C++ support? Is there a recommended website I could use to find examples of alternativ...
[1 reply] : imperative? Is that procedural? As I understand it, Procedural and O... (by kbw)
My header files' implementation
 
I make my own header files in my free time for my own use. For eg. I made luint.h for handling very large integers and ekumath.h for some useful math functions....
[9 replies] Last: learn to read program comments (by DeXecipher)
Not being able to overload ++ operator
 
I am not being able to overload ++ operator. I have written the following code: #include<iostream> #include<conio.h> using namespace std; class A { ...
[7 replies] Last: @Peter87 You are right. It is my typo.:) (by vlad from moscow)
optimize execution time
 
WHAT HAPPENS IS THAT THE EXE FILE GENERATED FOR SOLVING THE PROBLEMS DOESNT PRODUCE ANY RESULT AT ALL ITS JUST THE BLANK BLACK SCREEN. DUE TO LARGE INPUTS WHICH...
[4 replies] Last: Nothing better, it took so long I stopped. (by S G H)
CPU emulator
 
Hello, I have to write an assembly/CPU simulator in C++, I wrote down all the functions, declarations, etc. The program will read from a file (instructions.t...
[1 reply] : In your instructions LODD takes a value, but your code treats the para... (by kbw)
by Patty
Program problem.
 
I have written this code to remove the comments from an input file and then put it into an output file. The program compiles and runs but it removes the whole ...
[3 replies] Last: It's supposed to be rather easy: while (getline(source, position)) // ... (by coder777)
by xzbit
Default document folder path
 
Hi, im trying to write a file to a default document folder something like... FILE* file; file = fopen("%docdir%\\test.txt", "w"); fputs("Hello", file)...
[3 replies] Last: thanks, both are working char* docdir = getenv("USERPROFILE"... (by xzbit)
Charge Account Validation
 
This program that prompts a user to enter a charge account number and then determines whether that number is valid by checking for it in a list of valid ...
[9 replies] Last: Oh Are you done. So do you think I will be ok adding this code? (by Godwin5174)
by hxc210
Convert C++ to C
 
Thanks a lot
[3 replies] Last: ¿why did you remove the opening post? For the undefined references, ... (by ne555)
What is this method of sorting called?
 
Hi, I just made a program from an algorithm I recall seeing somewhere. What is it called? #include <cstdlib> #include <iostream> #include <windows.h> ...
[1 reply] : I see bubble sort on lines 20 -23, then below that, it prints the last... (by Smac89)
Help Plz (i Have C++ Turbo)
 
What c++ are all the outhers useing?
[5 replies] Last: emacs, not an IDE, but gets the job done (by Smac89)
by mv81
Help writing this C++ program
 
Having trouble with writing this any help would be appreciated, Im not very good at writing code so any help will be appreciated Thanks. Write a program t...
[3 replies] Last: Interesting assignment you got there. Seems challenging enough; the on... (by Smac89)
c++ program
 
can anyone code this c++ program! a program for a bank institution! The program will ask the user to input the client's ID number of 5 digits, name, surna...
[5 replies] Last: post a link to the code on like paste bin so we at least no ur not lyi... (by closed account Dy7SLyTq)
bits and bytes
 
My professor wrote out a question on an exam and I am curious what your thoughts were. 2 bytes = 15 bits. (T or F) Logically that would be 16 bits, and...
[1 reply] : However, after some research I have found that it could actually be t... (by cire)
Algorithm Hint: Minimum cost path visiting half the cells in a grid?
 
I am trying solve this a problem: http://usaco.org/index.php?page=viewproblem2&cpid=245 In short: 1. Input is an N x N grid with a non-negative integer in ea...
[2 replies] Last: Thanks. But what I want is not the shortest path. It look more like th... (by meteora)
March 2013 Pages: 1... 3132333435... 51
  Archived months: [feb2013] [apr2013]

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