General C++ Programming - April 2012 (Page 48)

[ask]How to read a text file to c++
 
guys, I need some help, I'm trying to make c++ progam to read text file. here's the deal, I have text file,"list.txt", contain "12,Ivan,45,Ryan,22,Rapael"...
[2 replies] Last: Thanks man, that's really help. (by StefanoKS)
by ciklez
Please solve my problem [Linked List]
 
I have a question on linked list 1. Write a program to read a list of integer numbers. Your program should be able: a. To add a new data into the list. b...
[4 replies] Last: are you just starting to work with linked lists? if you're comfortable... (by shocklightning)
Function returns wrong value
 
ok let me set up a sample of this problem: data structure: (simplified version) struct a { int value; a::a(int val) { value = val; } ...
[6 replies] Last: Rule of three: if you need a destructor, a copy constructor or an assi... (by ne555)
not declared in this scope
 
Hey i am really new and i bought a book on coding for c++ and every time i mannulay type in some sample code out of the book it always says random errors like '...
[5 replies] Last: thanks for the lead yeah im reading alot of reviews on the books he re... (by umfan110)
by metal7
Error in this code?
 
I have been told by my professor that there is an error in this code but it compiles just fine. He said that it had a simple common error. Any help with a brief...
[2 replies] Last: int main() { short * pPtr; pPtr= new short;//1 *pPtr... (by patchesOhulihan)
Binary tree recursive functions
 
So I'm learning about binary trees in this book that I've been reading and one of the exercises asks me to "write recursive definitions that perform a task on a...
[1 reply] : heres a recursive function that gets the size of the tree, but it woul... (by GFreak45)
merge sort
 
Help! I need some help on how to write a func. that takes a list as an arguement and returns two equal lists. Any hints? I am pretty new to this, and am pretty ...
[5 replies] Last: #include "stdafx.h" #include<iostream> #include<list> #include<cstdlib... (by Tsweeney)
Can someone help me out with this please?
 
I'm having trouble with this.... the traversing of the trees are so wrong... and i can't find the answer... #include<iostream> #include<conio.h...
[1 reply] : Do you have any idea what the problem is? (by Zhuge)
by Veltas
Appropriate null-pointer convention
 
There seem to be a few ways of representing null-pointers; 0, C's NULL, and nullptr. Thing is, they always appear to represent 0, and I'm not sure what the u...
[4 replies] Last: Thanks both for replying! (by Veltas)
Pretty Please Help :(
 
I've created the following code in a .cpp file using Microsoft Visual Express C++ 2010 (taken from Herbert Schildts A Beginners guide 2nd Edn): /* This is a...
[7 replies] Last: For pausing after execution, I usually just do this: // I always rem... (by Ben Bowen)
stacks and queues help please!!
 
hi guys, i have 2 questions about stacks and queues. i found some hints about them from here but i can't write programs these are the following questions. pleas...
[3 replies] Last: string text; int i = 0; stack<char> mystack; cout << "Write th... (by Ortonas)
vector<vector<string>> inside map
 
Hi, I don't know if what I am trying to do is crazy. but the following is the problem I have a map: //Global.h map<string,vector<vector<string>>> mill_pos...
[11 replies] Last: Yes, I see that it works! Thanks for the code, I need to figure out wh... (by DeepBlack)
by cbrew
Sorting an Array
 
I have to sort an array of 10000 elements with bubble sort, select sort, insert sort, and quick sort. And print every 1000th term. Im pretty sure there is somet...
[4 replies] Last: Hi! I'm not sure of the source of your algorithms, but a good one is W... (by liquidfuzz)
Reading from a text file, skipping chars
 
Hey. I'm trying to write a program that reads a series of values from a text file via cmd (C:\C++\program.exe < input.txt), and calculates and prints the logari...
[1 reply] : Try reading each line of input as a string and then attempt the conver... (by PanGalactic)
Using void* and class* (1,2)
 
Is it ok to use a void* to store the address of a class?
[26 replies] Last: Hey sorry I didn't want to start a war ( it's true my last post can be... (by aquaz)
Passing Arrays to Functions
 
Hey everyone, I just started learning C++ this semester and cplusplus.com (specifically the forum) has been an invaluable resource for me. I have a quick ques...
[11 replies] Last: intNumbersArray is really a bad name. int main (int intNumbersArray... (by closed account S6k9GNh0)
by Exiled
A cross platform similar alternative to Winsock2
 
Alright, I'm going to be programming a multiplayer aspect into my game pretty soon. I want the game to be compatible with Linux, so I would prefer to use a cro...
[7 replies] Last: Winsock2 is not cross-platform. There are subtle differences but WinAP... (by closed account S6k9GNh0)
NEED HELP WITH THIS PART OF CODE
 
#include <cstdlib> #include <iostream> #include <string.h> #include <cmath> using namespace std; int main(int argc, char *argv ) { if(argc==1) ...
[6 replies] Last: I would like to differ char **argv; // argv = pointer(pointer(char)... (by Danishx83)
makefile: symbol(s) not found for architecture
 
Hello! I'm trying to solve an issue with makefile. I have a main.cpp and then addOn.cpp and addOn.hpp. I'm just trying to do the simple makefile to co...
[no replies]
Use C++ & wxwidgets for GUI or Use Java
 
Pretty much explanatory. I've got a timer program I wrote but it seems nigh impossible to try and decode all the BS that is wxwidgets and try to decipher it to ...
[2 replies] Last: Use Qt, the easiest GUI creator ever conceived (with C++). www.qt-pro... (by TheDestroyer)
April 2012 Pages: 1... 46474849
  Archived months: [mar2012] [may2012]

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