General C++ Programming - March 2015 (Page 2)

by noaboa
Bool array and ofstream
 
I have been programming c++ for around half a year. And im trying to write to another file with a bool. I cant figure out how to just output what I have written...
[5 replies] Last: Then use std::ofstream::app in the constructor on line 40. (by coder777)
by jcf5xh
write file into Fat16 file system?
 
How would you do it? I have a program here that reads a file from the fat16 into the folder the program is in. Is it parallel to this code? More involved? I...
[5 replies] Last: To clarify further, I basically want to implement the reverse of this ... (by jcf5xh)
operator== ambiguous
 
#include <utility> typedef std::pair<int, int> pii; bool operator==(const pii&, const pii&) { return true; } int main() { return 0; } // I can...
[2 replies] Last: Many Thanks! I think you are right! (by Wu zhen hai)
Which container can hold more information?
 
Hi, I'm working with subsets of integers and using a structure vector<vector<int>>, but as my number of intergers is 100 and then I have 1.267.650.600.228.230....
[2 replies] Last: Thanks Peter87, sorry for my stupid question, LoL! So, a limitation t... (by NeoKratox)
by Matep
Need help with the program which was on my last programming competition
 
Hi guys, need help with the idea on how to solve this assigment with an fast enough algorithm. There is a parkinlot with P spaces, parked one next to the oth...
[2 replies] Last: Ty @np555 I think i understand what you're saying, ill try to write it... (by Matep)
by Matep
Struct/Function
 
Hi guys, need help with a function, it should return a substring and position where '.' should be switched for a '#'. Can i make a struct function and make a s...
[3 replies] Last: Instead of creating your own type, you could use a standard types like... (by Peter87)
Implement memory allocation functions malloc and free
 
I'm new to C++ and have no history of studying it in school. I'm doing my graduation in CS and have been given a project that titles the same as above. As far a...
[no replies]
this is my project and i need to submit it .
 
my program does not printing the records of the inputs here's the code.hope someone will help #include<stdio.h> #include<string.h> #include<conio.h> #inc...
[1 reply] : You need to initialize int ch; You have some crazy memory things goi... (by ultifinitus)
factorial of 1000
 
please help me finding the factorial of 1000 using doubly linked list in c++
[9 replies] Last: thanks bro i have completed (by sam9293)
by XscegX
EXTREMELY NEW TO C++, help!
 
ok so I've got to make a program that converts centimeters to inches and then converts that amount of inches into the respective yards, feet and inches displaye...
[4 replies] Last: Good point, not sure why I went ahead and put the "12" on the end. I ... (by XscegX)
Doubly Linked List show item HELP!
 
So in my program, I have created a grocery list with the main variables being the name of the item and the quantity. I have to create a recursive function th...
[5 replies] Last: Well your printBackward() function doesn't need to return a value sinc... (by dhayden)
by yj1214
A question about g++ -l
 
g++ -l I heard that this tells compiler the library name. What is it mean by library name? is it the file name? Also, this is not related to g++ but what...
[8 replies] Last: These days, every mainstream C++ compiler supports inter-procedural o... (by dhayden)
by MzDoll
Vectors and Algorithm
 
Hi guys, I am having problems with vectors. I am suppose to create a vector with 10 objects, which I have done, shuffle the vector and print it. Then I have to ...
[12 replies] Last: https://sourceforge.net/projects/pwwhashmap/files/?source=navbar this... (by pww71)
Sorting a vector of Indeces
 
Lets say I have a huge vector of objects called Log. A log contains a timestamp, a category and message. This vector cannot be changed. Searches are to be p...
[1 reply] : Create a functor that sorts on the proper criteria. For example: s... (by Duthomhas)
error LNK1561: entry point must be defined
 
error LNK1561: entry point must be defined - I have received this error after build solution on my program that I am trying to complete for my class on converti...
[2 replies] Last: Sorry, not quite understanding the *nix (by chainey35)
by yj1214
! operator
 
#include <iostream> bool checkSomething(){ return false; } int main(){ if(!checkSomething){ std::cout << "hello" << std::endl; ...
[4 replies] Last: In your original code, if(!checkSomething){ std::cout <<... (by Alrededor)
Template struct
 
completed
[3 replies] Last: So first you have to read in the first line which will determine how m... (by giblit)
Runtime error in console
 
for example int num; std::cout<<"Please enter a number: "; std::cin>>num; when this code is compile and run, it asks the user to input a number, if mis...
[2 replies] Last: Yeah, the both worked. Thanks for your help @giblit (by N495t4r)
Would Like Help Proofreading My Code
 
I have created a function that deals with an array of pointers and I would like some help proof-reading it. VS seems to accept the code but I want to make sure...
[11 replies] Last: instead of lines 9-14 you may simply do Objects = temp; or use std::... (by ne555)
Approximation
 
int x =1.7 + 3; std::cout<<x; //this will print 4.7 as the value of x, how do I make the program print 5 as the approximate value of x?
[2 replies] Last: Oh my bad.. double x =1.7 + 3; std::cout<<x; //this will print 4.7 ... (by N495t4r)
March 2015 Pages: 1234... 28
  Archived months: [feb2015] [apr2015]

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