General C++ Programming - November 2015 (Page 9)

I really need help formating output to a text file.
 
Everything here works like I want it to, it outputs to the text file just like I want it to but my teacher needs it to be organized in columns. I asked how and ...
[1 reply] : Alas, correctly formatting floating point numbers is not so simple as ... (by Duthomhas)
Triangle Program Assistance
 
Hello Everyone! In my class I was required to design a Triangle program that tells the user whether the three sides entered could form a triangle, and the prog...
[3 replies] Last: And I'm sorry if I'm not understanding this part correctly, but when y... (by minty2015)
by guru23
Reccursion
 
I know how to get the 155, but how is rec(19683) printing 16633? I'm getting 19633 for some reason. Thanks for taking the time to read. #include <iostre...
[3 replies] Last: As I said, check your calculation: there must be some mistake. (by minomic)
need to understand how this code works
 
I found this code online and want to use it but I want to understand how it works. I am not sure what this operator means "/=" ? how is this code converting ...
[1 reply] : uiValue /= 10; is the same as uiValue = uiValue / 10; ... (by closed account 48T7M4Gy)
Memory allocation problem
 
Hello. Trying to allocate some memory inside a function and then use it outside of the function. For some reason it doesn't work. This is my code: http://haste...
[3 replies] Last: After looking at it again... changing a pointer in a function won't c... (by Gamer2015)
by MzDoll
Is it possible to have code in a .txt?
 
Hi, I am currently working on a group project and we have made this code to compare codes to see if their similar. Well I was wondering if it was possible to us...
[5 replies] Last: @Peter87 My partner made up the main code and he included program1.txt... (by MzDoll)
Help with C++ Command Line Program
 
I need help first finding the exact point size from the input file I'm reading in through command line, so that's what the int extractPointSize() function is us...
[2 replies] Last: I need help first finding the exact point size from the input file I'm... (by zachd07)
Manipulating an file
 
My program right now has me read in a file for my program, which contains this text: Misc-Crackling-medium-r-normal 12 This is a short line. misc-Futura Po...
[2 replies] Last: Hey Computer Geek, I currently have the program like such. The thing ... (by zachd07)
Zzhhh
 
Zzff
[2 replies] Last: I'm having a problem with this same code.. I can't figure out how to g... (by bambam)
let headers generate out of cpp-files
 
Hi, I never liked the double-writings of function names. Through google I found lazy c++ and makeheaders, which were not pretty helpful. Might you have some ot...
[2 replies] Last: oh, I didn't know that! that should definitely be changed, thank you ! (by DarkTrick)
How to call a struct function in main(if possible)
 
So ive been stuck on my project for quite some time now. My professor said that everything needs to be initialized in the structure, but i did it all in the mai...
[2 replies] Last: with lines 19,23,and 27 my assignment states that those functions need... (by seanster)
How to iterate though each character of a string from a json file with Boost?
 
I'm trying to load up a game level using a pseudomap that I have stored in a json file, but I don't know the syntax on how to iterate through every character of...
[5 replies] Last: for(boost::property_tree::ptree::value_type &v : pt.get_child("level... (by wh1t3crayon)
How do I use class objects within another class??
 
IMPORTANT! MY CODE I NEED HELP WITH IS IN THE COMMENTS, I have come a bit further even but the code is still a mess I have an assignment past due, and hav...
[13 replies] Last: stringConstIterator.toInt32 Wasn't valid I have learned, I am sti... (by AbsenceDev)
operator= Not As Expected?
 
Hi there! I'm trying to make it so that when a pointer is created for my class and its set to NULL, that it's automatically changed to create a new MyClass(); ...
[5 replies] Last: I had read about it using a constructor operator. The idea is that ... (by MikeyBoy)
How to dereference a pointer
 
How to dereference a pointer to pointer, for example if I have int** how to dereference it to get the int* pointing to int. Thanks.
[5 replies] Last: #include <stdio.h> /* printf */ #include <stdlib.h> /* qsort... (by pacman169)
Pressing any key to achieve something?
 
How do I code something to where if any key is pressed it will do something such as returning a small program to its original state? I was thinking that an "if"...
[2 replies] Last: Let me know if this doesn't work... #include <iostream> #include <c... (by turtlesavage)
Console Menu with Blinking Start Button and Unintrusive Input
 
Here is the code I'm working on in main()... /////////////////////////////////////////////// bool start = false; while (start == false) { go...
[5 replies] Last: Ok, so I have my code working at this point. This is what I've come u... (by turtlesavage)
by kalki
Unit Test Case for classes
 
How to write unit test case to check functionality of classes ?? I am using cppunit framework for unit test. class A: { int test(char *v,int x); bool (stri...
[no replies]
by kalki
I'm trying to make a makefile with multiple files. Can someone help me?
 
I'm trying to make a makefile with multiple files. Can someone help me? The files I have are main.cpp, file1.h, file1.cpp, file2.h, file2.cpp. /*simple comman...
[8 replies] Last: Thank you peter........ Your guidence are very useful to create makefi... (by kalki)
Arrays with textfile data(help)
 
I am making a program that will take the input of x amount of numbers on oneline that it will calculate the amount of data, and growth, and average. The average...
[1 reply] : It would be helpful to me to see a sample of your data, tree.txt... M... (by SamuelAdams)
November 2015 Pages: 1... 7891011... 26
  Archived months: [oct2015] [dec2015]

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