General C++ Programming - January 2015 (Page 4)

by zevxc
Help with a Big O Algorithm
 
Algorithm of: for ( j = 0; j < n; j++ ) { for ( k = j; k < n; k++ ) { <some operation> } } will result in a number of iterations of <s...
[1 reply] : No one is going to do the homework. What part is confusing you? (by Militie)
Convert to int part of 1000 digit long numer defined in char array
 
hi please how do i convert just the number from position 4 to 15 from this char array and convert to int and save to variable char numbers ="541554445465...
[4 replies] Last: yea i wont copy anything i just want to see the principe of it how do ... (by Tommy1998)
by tmason
Help with conversion of code to modern equivalent...
 
Hello, I am trying to convert some old code I found online to a modern equivalent. I can easily convert the vec4d_length function to glm::length() equivalents...
[3 replies] Last: Functions attributes. They aren't standard C or C++ per say, more so a... (by Computergeek01)
by Gyiove
dynamic file
 
Hello everyone! I'm planning to create 'Dynamic file' here's of it works: dfile d; // void open( char *filename ) d.open("example.txt"); // int cre...
[4 replies] Last: somewhy i dont really like boost. I guess it would not hurt if i would... (by Gyiove)
Euclid gcd don't working
 
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; int v int gcd(v ,v ) {int r; {while(v !=0) r=v %v ; v =v ; ...
[2 replies] Last: Thank you very much! (by Thebeatboxer)
Help with a rookie's program!!
 
I am a newcomer to a CS class on my campus and am having trouble starting to build one of my first assignments... I have a limited knowledge of HTML however am ...
[no replies]
Why I hate std::vector
 
Aside from the word vector being a misnomer, I have issues with both std::vector and std::string, especially in beginner programmers' uses. Recently, I've spe...
[10 replies] Last: This is an example of something that drives me nuts: telling programme... (by dhayden)
by sali28
graph construction
 
hello i have a bad_alloc at memory location in the debug ,please can you tell me where i cheated this is where the problem is ////////////////////////////...
[2 replies] Last: Specifically: clip = tran->getBlendedMotion(); delete tran; If tran-... (by dhayden)
Move the @ from lbf file across the file (up, down, left, right and toggle)
 
Hi! I am new to coding in C++, and I'm getting frustrated at this program. The objective is to upload a lbf file from within the file and move the '@' characte...
[no replies]
undefined symbol on run
 
I'm creating a PHP library in C that uses libpng, everything works fine on a Mac, but on Ubuntu Trusty, I get an error when I try to load it. This is how I co...
[no replies]
Debugging and Testing a Program
 
The following code fragment should find the sum of 5 numbers. There are errors in the code fragment. Provide some meaningful test cases and correct the code. ...
[1 reply] : Put the code inside a function and try to compile it. Look at the erro... (by Peter87)
difficulty in reading from dat file and then printing it.
 
hello everyone, i have got a dat file which is as follows: é Umair ÌÌÌÌBabar ÌÌÌÌBSCS ÌÌÌÌÌÌÌ×£p= ×@ ê Shahid ÌÌÌFarid Ì...
[1 reply] : this is what i have to do: Each record in the records database is ass... (by ozairnaeem)
Logical Errors
 
I need help with this. There are logic errors in the following program and it is not producing the correct output. Describe how you would debug the program. ...
[1 reply] : Please, use code tags: http://www.cplusplus.com/articles/z13hAqkS/ Wh... (by MiiNiPaa)
need help with image analysis
 
Hey guys! I'm about to do my final theses and have been proposed the following assignment: Given a map over a forest landscape generated from coordinates ...
[1 reply] : Take a look at OpenCV: http://en.wikipedia.org/wiki/OpenCV http://ope... (by coder777)
Is it possible to pass an operator as an argument in C?
 
I'm writing a program in C that performs operations on an array of 4-byte unsigned integers. Here's some usage examples to give you an idea: + n m // print...
[1 reply] : #include <stdio.h> unsigned int plus( unsigned int a, unsigned int b... (by JLBorges)
by Orval
Why does this code cause my program to stop working?
 
#include <iostream> #include <vector> using namespace std; int main() { cout << "\t\t\tWelcome to Vector Testing!\n\n\n"; vector<string>inventory; ...
[8 replies] Last: > If there is a book that teaches the std:: way, ill get it. C++ Prim... (by JLBorges)
by tm70
Big O Notation help
 
Algorithm of: for ( j = 0; j < n; j++ ) { for ( k = j; k < n; k++ ) { <some operation> } } will result in a number of iterations of <s...
[1 reply] : I will give you a hint. n + (n-1) + (n-2) + (n-3) + ... + 1 ... (by htirwin)
code fails due to large input
 
So the question is this https://www.hackerrank.com/challenges/summing-the-n-series my code is this: #include <iostream> #include<cmath> using namespa...
[9 replies] Last: long long and unsigned long long are fundamental C++ integer data ... (by JLBorges)
head file for the use of 'error'
 
In the c++ codes, I would like to use error("Something I would like to say"); what is the headfile I need to use if I want 'error'? Thank you!
[5 replies] Last: Generally, no. Some people (such as myself) prefer to have std::cout ... (by TwilightSpectre)
c++ Program help
 
Having problem with my code. i keep getting an error towards the bottom of the code. i need the user to enter a word. and with that word convert it to numbers. ...
[2 replies] Last: //<numeric> std::cout<<std::accumulate(name.begin(),name.end(),0, (in... (by poteto)
January 2015 Pages: 123456... 24
  Archived months: [dec2014] [feb2015]

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