General C++ Programming - March 2014 (Page 14)

by Disch
Calling python modules from C++ code
 
Hey everyone. I'm working on a side project where I want to have a main program that's written in C++. But I want the program to be expandable with modules th...
[no replies]
count integers with array
 
Hello people, now I'm learning array. I now know how to count integers with while loop but I'm not sure how to count the integers with array. so the question is...
[1 reply] : thread already started here... http://www.cplusplus.com/forum/beginner... (by wildblue)
Draw simple graphs
 
Hi, I am writing sample programs for graph problems like Dijkstra or Bellman-Ford algorithms. In Dijkstra, for instance, when I input my program a set of ver...
[2 replies] Last: For what you want to do, it would be a complete overkill to try to lea... (by Duthomhas)
Forloop help
 
I need help with this function it will use a for loop to run through each player until it reaches the number of players and ask for the player’s name. The n...
[6 replies] Last: welcome my dear :) (by mirfee)
How can I make this function run faster?
 
This function is part of a small program whose job is to take a delimited file and create a sql insert statement. It doesn't do much the delimited file is a 1gb...
[12 replies] Last: I am not an expert on SQLite and have not used it in a while, however:... (by Alrededor)
The Sieve of Eratosthenes and Goldbach's Conjecture
 
Assignment: http://web.njit.edu/~kapleau/teach/current/cs115/project.php#prj2 Implement the Sieve of Eratosthenes and use it to find all prime numbers less ...
[1 reply] : line 6 of your function, will create infinite loop on line 8. You can... (by Smac89)
by Wake
Script does not work Windows XP
 
Good Morning, I ran this script on windows 7 and tested it on windows 7, 100% ok, but not working in windows xp Could you help me? #include <iostream...
[9 replies] Last: compiled in windows xp and it worked without problems! Thank you all... (by Wake)
The Sieve of Eratosthenes and Goldbach's Conjecture
 
The Sieve of Eratosthenes First, write out the numbers from 1 to N. You can write them in a line, or in a square like this (for the numbers 1 to 100): The...
[2 replies] Last: i have this code which outputs all prime numbers up to one million, bu... (by dadapro)
by yhu420
Extreme iterating
 
Hi there, I am encountering a very annoying issue, and I couldn't find any solution knowing that my problem is rather .. uncommon. I need to iterate througn a ...
[4 replies] Last: Well thanks for your answer, I did as Dish said and it re-works perfec... (by yhu420)
help creating a loop to calculate formula
 
Hi, I am trying to create a code and cannot get the following part to work : for (int n = 0; n = timesteps; n++) { n = n + 0.1 ; cout<< "timesteps...
[1 reply] : Unbalanced brackets on line 9 : you have opening '(' but no closing on... (by MiiNiPaa)
by eastw
Reading Date From File
 
Hi guys need a help here. So here's my file content: J001 Graham Bell 145 20/03/2012 23/03/2012 my current code is. #include<iostream> #include<...
[1 reply] : Firstly, your declaration syntax is incorrect. Try: ifstream in; F... (by PartialWrtX)
by DVS84
for Loop help
 
Hi Guys Im new here so nice to meet you. i need some help understanding this for loop for an assignment, I am new to C++ and am enjoying it :D here is t...
[4 replies] Last: Thanks again MikeyBoy. I have made the necessary changes and it work... (by DVS84)
by Ahleer
Typedef Structure Question
 
I am currently using an older sorting code for data and I am trying to modify it to read different data types. The code is actually a sequence of several execut...
[7 replies] Last: You're welcome :) (by MikeyBoy)
how are arguments passed in reference to a function
 
I'm trying to modify a ns3 script. calling of the function by its reference has left me confused the function defination . . void RemainingEnergy (...
[2 replies] Last: thanks now it seems obvious (by soumyaxyz)
Real time Numeric Derivative
 
Hi, There has been a discussion on http://www.cplusplus.com/forum/general/103788/ about taking the first derivative but this is applied to a already measure...
[no replies]
by venz
Good Day.. please help me.
 
can someone tell me whats wrong with this code? the output supposed to be Full Name : Venz Bautista First Name : Venz Last Name : Bautista bu...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
urgently need your help. ;( (array)
 
hi. ;) how to do this? - ask the user to input entries of 10x10 array. sort each column into increasing order. print out the array with sorted columns? tha...
[5 replies] Last: #include <iostream> #include <string> #include <vector> using names... (by kannanmj)
calculating standard deviation from file
 
Here's my attempt: input.open(name); if (input.fail()){ cout <<"Error opening file"<<endl; } while (input>>numbers) { counter++; total += numbers...
[1 reply] : See: http://www.strchr.com/standard_deviation_in_one_pass (by JLBorges)
C++ Linked List Sort a List as It's Being Created?
 
This is part of the header class LinkedList { public: struct ListNode { public: ListNode( const string& theString, ListNode* pNext = NULL ) {...
[6 replies] Last: 23 if(mpHead) . . 33 else 34 mpHead->word = theWord; At line 34, ... (by kannanmj)
Operator Speed
 
Hello. I want to make Class for 2D array. This is part of Class Definition. class CMatrix{ public: explicit CMatrix( int rows, int cols ){ m_pArray = new...
[6 replies] Last: Thank you. (by ok97465)
March 2014 Pages: 1... 1213141516... 36
  Archived months: [feb2014] [apr2014]

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