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

Can't Figure Out What's Wrong With My Code, Can Someone Assist?
 
Can someone please run my code and tell me I need to do to fix it? I'm absolutely stumped on what to do and am freaking out a bit because I need to turn this in...
[no replies]
c string difficulty
 
char literal = "Anna Bannana"; char destination ; strcpy(destination, literal); cout<<destination<<endl; I would expect a truncated result to = 5 ...
[4 replies] Last: Which means that the source string can only contain 4 characters. Yo... (by jlb)
Destructor Problem causing an exit exception.
 
I've been searching this problem for a couple days now and nothing I try seems to work. I'm getting it when my program ends, otherwise the program runs just fin...
[17 replies] Last: #include <iostream> #include <string> using std::cout; using std::en... (by closed account 48T7M4Gy)
by mb123
11 programs to make
 
Hi guys, I need help with my assignment. I have been missing alot of classes due due to basketball practice, this time my teacher wont spare me if i dont submit...
[2 replies] Last: I agree I could help you with the sum project though. (by crazyjoshua27)
by feco
Circles intersecting,comparing arrays Visual Studio
 
I've got a task to find which circle intersects with the most other circles. I have the x-coordinates, y-coordinates, and the radii of many different circles...
[no replies]
help with sorting array values
 
help with a function. I'm trying to use the function bubblesort to sort my values in the array positive_num. can somebody please tell me what I'm doing wrong? t...
[9 replies] Last: I suggest you think in terms of describing in words what the various p... (by Chervil)
Code not working
 
im trying to make a tic tac toe game where u can customize it, for example: width = 5 length = 4 x o x o x x o x o x x o x o x x o x o x width = 3 ...
[3 replies] Last: oh, I thought that you would use each string to represent a row. (by ne555)
Read and Write file (merge lines)
 
I am given a text file named tr4_1.txt, the file content is below: 1110000000001111 1110100000000000 1000001111111111 0111011101010101 I would like to ask how ...
[2 replies] Last: Don't write a line break if you want it in one line. ofs<<line<<endl... (by Thomas1965)
Removing duplicates
 
I believe 2 posts recently have covered this briefly, but I haven't found anything definitive. (1) I need to take a file and output data that includes both dupl...
[3 replies] Last: Thank you Duoas and kemort! (by closed account 9N36C542)
Error with tuple
 
I made a tuple with a string, array, and then an object. For some reason, it says that there's a syntax error involving one of my array brackets in the two line...
[1 reply] : A tuple cannot have a native array as a member. If you must have an a... (by cire)
by ZB1993
Decimal to Binary Converter Using Functions in C++
 
Hey, So I'm in an intro C++ programming course and I'm completely stuck right now. I am supposed to make a Decimal to Binary converter using functions, store...
[1 reply] : This might help. Just store each result per iteration in your array. R... (by closed account 48T7M4Gy)
by kalki
How to read text file line by line?
 
#include <iostream> #include <fstream> using namespace std; int main() { ifstream in("file.txt"); if(!in) { cout << "Cannot open input file.\n"; ...
[10 replies] Last: Try using a class container to store multiple objects in. loop through... (by Steven Zinn)
OpenGL Creating "Sparks" for Pong
 
I am trying to learn OpenGL for C++. I want to do more 2D work. I started by making a Pong clone. Everything works fine, but I want to make the GUI look better....
[no replies]
Having trouble with duplicate from file
 
So I need to create a program that opens a text file and reads the content and then create an array. I also need to create an array that uses the same text file...
[5 replies] Last: No, I can't seem to figure out what to do, if you get any further alon... (by Akroncs)
C++ tic-tac-toe (1,2)
 
How can you fix this? I can only use an online website, cpp.sh, so I need help. Trying to make one for all elements //perodic table of elements #include <ios...
[20 replies] Last: cpp.sh can't use the windows.h header. It only works on windows comput... (by jasonwynn10)
someone solve it please
 
write a program to: read 2000 values from the user then ask the user about a number N, then display how many numbers of N in this array ,then add each two cells...
[3 replies] Last: The logic of your code doesn't coincide with what you're trying to acc... (by soaph)
Problem with Sudoku game.
 
Hey guys, I'm trying to make a 6x6 Sudoku game, and i did it but with a small problem. The app is asking user if he/she wants manually to make a puzzle or she/...
[13 replies] Last: Yes please post the complete code and I will have a look. Hey cire ... (by whyunomad)
by Ozzy69
Help with program using multiplication russian method
 
Hi, i want use multiplication russian method with form recursive in c. Look link of multiplication russian: http://mathforum.org/dr.math/faq/faq.peasant.html ...
[2 replies] Last: Your algorithm is off. Remember, you get two numbers, x and y. (They ... (by Duthomhas)
Can't Write this Program
 
Hey guys i need your help. I have a class assignment to write a program that compute students cgpa and i don't have the least idea on how to go about it. I am o...
[16 replies] Last: I have been trying in vain to sen my code....it is not sending (by Ochanya)
Won't open resource file?
 
Here is the code i am using. The code runs, however it will not open the resource file (address.xml) I am using visual studio and at a loss for ideas on what is...
[2 replies] Last: What do you think (pos1 = line.find("<name>")) << string::npos evalu... (by cire)
November 2015 Pages: 12345... 26
  Archived months: [oct2015] [dec2015]

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