General C++ Programming - May 2015 (Page 7)

breaking out of a while loop without using break
 
So I'm in the middle of writing a program and stumbled upon something. Here's a sample code of my question #include <iostream> using namespace std; int...
[8 replies] Last: Is there any way I can break out of the loop without having to use an... (by andywestken)
How to compare data in one column and count the same
 
I have a simple trouble. I need to compare data in column in my .dat file and count the number of identical data
[1 reply] : Man that is not really helpful. Try to post the code so we can see whe... (by Momothegreat)
Dynamic 2d arrays of objects allocate in desired index
 
Hi. I have this short game I am designing. It has an Organism class, an ant class and a bug class. Organism is parent. Other two inherits from parent. I want...
[4 replies] Last: thanks! it is working now (by csstudent123)
by HMinNC
Help needed - TIC TAC TOE Game
 
Hi, I am new to programming. I wrote this code to play TIC TAC TOE. IT works on my computer and several others but when my teacher compiles it and runs it on...
[4 replies] Last: Thank you for your help. I really appreciate it. Holly (by HMinNC)
Don't get input from user after getch()
 
I'm doing something like given below #include <stdio.h> #include <ncurses.h> int main() { int ch; ch = getch(); while( ch != 'E' ) {...
[1 reply] : > getline( (char **) buf, (int *) 50, stdin); the compiler was gentl... (by ne555)
Type conversion
 
Hello, I need to convert a string of hexadecimal digits into it`s equivalent integer value but getting these results: 0X3F. 0 0XFFFF. 0 0X0000000...
[13 replies] Last: I actually wrote a function for this that mathematically converts str... (by IWishIKnew)
Someone help me please!
 
My teacher is no help. how do I write to and read the file? MUST BE IN BINARY #include <iostream> #include <fstream> #include <string> using namespace std...
[7 replies] Last: can someone help with counting the characters You said you're file w... (by andywestken)
Grade Depends on This ASAP please!
 
Hi, I only have a couple of hours to send this file for a grade but it is not compiling. Could anyone please help me get my program to work? I don't want to com...
[6 replies] Last: Adding the function definitions is simply copying the prototype, remov... (by Little Captain)
I NEED HELp!!! PASSING ARRAY TO FUNCITON
 
I have no idea how to pass array to function... I thought i just need to use & .... int user(int x); int computer(int x); int binarySearch( int &search, in...
[11 replies] Last: @ wh1t3crayon If he wanted to make reference to a static array he cou... (by TheHardew)
how to print all the names from a text file to console/program in alphabetical order? #c++ :'(
 
//Names inside the text files are: Darwin, Bea, Hans, Denzell //I want to print them in alphabetically order so the print out in console will //be like this: ...
[6 replies] Last: inside the while? after reading from the text file?? (by closed account 9wkE8vqX)
Help with memory leak
 
I have a memory leak, whenever using read (option 1) it appears with an À following the text in the file, can someone help find the leak please #include <io...
[1 reply] : Any time you have something like this: char *Words = new char ; Yo... (by Texan40)
dating service file problem
 
The program i am currently writing isn't properly reading information from the file. I can add information to the file, but it doesn't display any. #include...
[5 replies] Last: Yeah, thank you so much. The loop worked. (by itsallpoison)
binary tree programming algorithm
 
i want to make a program code that can count these numbers. ive already done the inorder,traversal and outorder of 1 2 + -3 / But,i dont really know how t...
[no replies]
How to download a file and execute from a url
 
how do i make it so i download a file from a url i choose the install path then execute the file
[1 reply] : You might use libraries like libcurl: http://curl.haxx.se/libcurl/ (by coder777)
Help!!! Void statement doesn't work.
 
#include <iostream> #include <cmath> #include <iomanip> using namespace std; void table(int); void numbers(int, int, int); int main () { c...
[3 replies] Last: Read this: http://www.cplusplus.com/doc/tutorial/functions/ (by mutexe)
how to display the neighbors of each vertex.
 
#include <cstdlib> #include <iostream> #include <iomanip> #define foreach
[1 reply] : Is this code working or not? As you have your templet class graph in... (by upX86)
display neighbosr of each vertex
 
hi guys. How can create a code to display the beighbors of each vertex in a graph. for example the neighbor of 0 is 0,3 neighbor if 1 is 0. Youll see the neigh...
[3 replies] Last: *cough* code tags *cough cough* I'll check it out tomorrow as I'm on m... (by Homberto)
by Ozzy69
How make a program in c++ that send email?
 
Hi, i wanted make a program in c++ for to the send e-mail with messagens of type: "Sorry, i cannot to go in your room today!" for email of yahoo or gmail. Have...
[1 reply] : I'd make a simple PHP webpage that takes HTTP POST parameters and puts... (by Homberto)
How do i insert a string from a txt file into function?
 
if i have an int main where i ask the user for a txt file then ask them to insert a string into it, how can i grab the string from that file and insert it into ...
[1 reply] : If I understand your question correctly, you are simply trying to read... (by minomic)
DeleteFile(String^.c_str()); doesn't work.
 
Hello, I am trying to have a program delete a file using the DeleteFile function passing a string argument with a .c_str() conversion, but VS2010 keeps throw...
[4 replies] Last: I need to remember that using C++/CLI. File::Delete worked, thanks. (by TheMohawkNinja)
May 2015 Pages: 1... 56789... 22
  Archived months: [apr2015] [jun2015]

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